I found the culprit.. It was UITextView
. Sorry if I don't mention I use UITextView for multiline label under address label.
Quoting "Taketo Sano" on other question : https://stackoverflow.com/a/5673026/453407
I've investigated how the auto-scroll is done by tracking the
call-trace, and found that an internal [UIFieldEditor
scrollSelectionToVisible] is called when a letter is typed into the
UITextField. This method seems to act on the UIScrollView of the
nearest ancestor of the UITextField.
UIScrollView
is auto scrolled to UITextView
when UITextView
text is changed. So I found the solution by subclassing UIScrollview
and override
- (void)scrollRectToVisible:(CGRect)rect animated:(BOOL)animated {
and return nothing to disable the auto scroll... If you plan to use it in future, just use a bool variable to enable / disable it by using
- (void)scrollRectToVisible:(CGRect)rect animated:(BOOL)animated {
if (!self.disableAutoScroll) {
[super scrollRectToVisible:rect animated:animated];
}
}
so you can disable the autoscroll before you change the UITextView by code and enable it after.