Reputation: 319
I have a long screen which is filled with UITextField
and picker controls. When I scroll down to a specific field and clicks onto the UITextField
control to input data, the UIScrollView automatically gets scrolled up to the start of the screen.
Please suggest how can I control the scroll position.
Main UIView: x:0, y:0, width:320, Height:1000
Ios 8.1 & xcode version -> 6.1.1
Thanks!
Upvotes: 0
Views: 491
Reputation: 931
I suggest you all to use below codeless library for keyboard handling.
https://github.com/hackiftekhar/IQKeyboardManager
pod 'IQKeyboardManager'
You don't even need to write any code, just drag and drop and it will work.
Upvotes: 1