The accepted answer is outdated, for this purpose pure iOS 8 sdk
In viewDidLoad, tell the View table to automatically calculate row heights:
tableView.estimatedRowHeight = 44.0f; tableView.rowHeight = UITableViewAutomaticDimension;
Implement the textViewDidChange: UITextViewDelegate method and tell the tableView to redraw every time the text is edited:
- (void)textViewDidChange:(UITextView *)textView { [tableView beginUpdates]; [tableView endUpdates]; }
And don't forget to specify the UITextView delegate somewhere, either in Storyboard / IB or in tableView: cellForRowAtIndexPath:
source share