I have several UITextField as subview of the UIScrollView. All these textfield are behaving like a different pages.(my scroll view is horizontally scrollable). Some time I am scrolling my scroll view with this method (- (void)scrollRectToVisible:(CGRect)rect animated:(BOOL)animated) And after I use this method to scroll , if I touch on any UITExtField ,my scrollView is scrolling automatically to the first UITextField which is the origin of the scrollview. Thanks.
2 Answers
1
votes
You've not been very clear with your problem description but I can give you a place to start looking. When ever any subview of a UIScrollView is made a first responder that UISCrollView calls scrollsRectToVisible. If the scrollView is scrolling to the wrong location that may be because the tap gesture is setting the wrong UITextField to the first responder. Why this is happening, I can't say (not without code). Hope this leads you in the right direction.
Nathan
Please remember to vote.
0
votes
I've answered to the same problem here: Disable UIScrollView scrolling when UITextField becomes first responder
Hope this helps!