UITextView scrolls up content when first clicked
Hi all!
I've been trying to fix this problem for a few days now and I'm still no where nearer to an answer. I'm using a UITextView inside a UITableViewCell. If I enter one line of text into the textView, dismiss the keyboard, everything is displayed nicely and properly.
My issue comes when I click on the textView to edit it again. When I click on it, for some reason the content is scrolled upwards out of the frame. This is how the textView was created and displayed:
CGRect rect = CGRectMake(0, 0, 300, 30);
details = [[UITextView alloc] initWithFrame:rect];
[details setScrolledEnabled:NO];
[details setReturnKeyType:UIReturnKeyDone];
[[cell contentView] addSubview:details];
I've tried using content offset to stop it from scrolling but it doesn't seem to help, does anyone have any ideas?
Thanks in advance!
|