Reputation: 407
Currently I have an UI designed that consists of two simple text fields for resetting password. In my viewm, I haven't used the UIScrollView
. So when the UI displays on an iPhone SE, the UI should move up as the UITextField
gets hidden behind the keyboard.
To avoid this, I am using a famous library:
https://github.com/hackiftekhar/IQKeyboardManager
But still when my UI comes it is not moving up.
Upvotes: 2
Views: 6109
Reputation: 598
Add the following lines to the AppDelegate
IQKeyboardManager.sharedManager().enable = true
IQKeyboardManager.sharedManager().keyboardDistanceFromTextField = 100
Upvotes: 1
Reputation: 1389
You need to add the following line to the AppDelegate
(to enable in all the view controllers) or just in the viewDidLoad
of the UIViewController
you want to enable the IQKeyboardManager
.
IQKeyboardManager.sharedManager().enable = true
Upvotes: 5