-
-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How Can I Get the height of the UITextView #125
Comments
Did you try setting the UITextView's scrolling off? textView.textContainerInset = .zero textView.sizeThatFits(.init(width: width, height: .greatestFiniteMagnitude)) |
Really appreciate for your replying. But I've tried your solution which still doesn't work. Could please help me out? Code as follow: class ViewController: UIViewController {
} |
Additionally, according to my test. " .sizeThatFits" works for text resource but not for image resource. |
try .height? |
Sorry for my stupid mistake. But .height still doesn't give me the right height. |
|
I have a rich string with a remote long picture inside. But how can I get the height of the picture or the textVIew? (Width is known)
I have tried UITextView.sizeThatFits(<size: CGSize). It's not working.
The text was updated successfully, but these errors were encountered: