I have a problem since I updated to iOS7.
I have base UIScrollView
horizontally and there is UITableView
on it
(looks like a navigation style).
And I addChild UITextView
on UITableView
not on the cells.
And it scrolled to UITextView
's cursor when typing keyboard. And it works greatly until iOS 6 but not since updating iOS7.
How can I solve this problem?
Thanks.
Handle textViewDidChangeSelection
in UITextViewDelegate:
- (void)textViewDidChangeSelection:(UITextView *)textView {
[textView scrollRangeToVisible:textView.selectedRange];
}
The exact solution depends on your application, you can handle by subclassing UITextView but I would prefer a decorator pattern here (on UITextViewDelegate protocol).
I hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With