I have a UITextView not scrollable with auto layout set by interface builder, and the text increase or decrease dynamically with no problem, but i want know what is the new UITextView height after setting text, i'm trying to do this:
NSLog(@"text before: %.2f",self.myText.frame.size.height);
[self.myText setText:self.string];
NSLog(@"text after: %.2f",self.myText.frame.size.height);
this is the result:
text before: 47.50
text after: 47.50
the text is increased in the view when i run it, but the size is the same, how i can get the real height after setting text?
All you have to do is:
textView
's scrollEnabled
property to NO
The last part is what does the trick.
Your text view will size automatically depending on its text value.