UITextView doesn't scroll carriage after first response on iOS 7

I have a UITableViewCell , and in this cell I have a UITextView with some text. When I call becomeFirstResponder on iOS 6 , it works as expected and the table view scrolls to the caret, but it does not work on iOS 7 .

I also have UITextFields in cells, and it works great with becomeFirstResponder on iOS 7 . Just a UITextView problem.

Is this a mistake or what have they changed?

+4
source share
1 answer

I came up with my solution that uses the (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated method from UITableView and the (CGRect)caretRectForPosition:(UITextPosition *)position UITextInput from UITextInput and after doing some math with heights. I achieved the same behavior as on iOS 6. It's not so nice, but it works.

If anyone comes with a better solution, let me know.

-one
source

All Articles