I have a UITextView
in all the cells of a UITableview
. The text view's height is increasing dynamically. As the text view size increases, I would like to increase that cell's height.
I am writing as
-(BOOL)textView:(UITextView *)textView1 shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
{
NSLog(@"textTag%d",textView1.tag);
NSString *stringToSave = [textView1.text stringByReplacingCharactersInRange:range withString:text];
NSLog(@"Save me: %@", stringToSave);
CGFrame*frame =textView1.frame;
frame.size.height = textView1.contentSize.height;
textView1.frame = frame;
//HERE I NEED TO INCREASE THE HIGHT FOR THE PARTICULAR CELL.
if([text isEqualToString:@"\n"])
{
[textView1 resignFirstResponder];
}
return YES;
}