[Solved] Auto Adjust UITextView and UITextField on appearance on keyboard [duplicate]

This is a fairly common problem, there are all sorts of solutions to it. I put one together and made it part of my EnkiUtils package which you can download from https://github.com/pcezanne/EnkiUtils Short version: You’ll want to watch for keyboard events and call the Enki keyboardWasShown method, passing it the current view (and cell if … Read more

[Solved] Not able to assign text to UITextView

Providing more error details might help to solve your issue. But you can still solve it by checking few things-: 1) Check for UITextView outlet in storyboard-: 2) Check if you have given correct class to controller . In my case it’s UnderlineViewController check for yours. Your controller should have same class. 2.a) Go to … Read more

[Solved] UITextView if line numbers is 2 [duplicate]

For Count the number of lines of text int numLines = textView.contentSize.height / textView.font.lineHeight; NSLog(@”number of line – %d”, numLines); And for iOS 7 see this Question/Answer. EDIT for iOS < 7: This is proper answer UIFont *myFont = [UIFont boldSystemFontOfSize:13.0]; // your font with size CGSize size = [textView.text sizeWithFont:myFont constrainedToSize:textView.frame.size lineBreakMode:UILineBreakModeWordWrap]; // default … Read more