The problem is that when I try to write in the text fields the keyboard cover them up. How can I scroll the text field up to see what am I writing. I have below lines of code to
How can I scroll the text field up to see what am I writing
This can be achieved in two ways:
IQKeyBoardManager
with its Swift variant as IQKeyboardManagerSwift
You can find it on GitHub and cocoapodsTo achieve follow the below steps :
SWIFT 3
Just install IQKeyboardManagerSwift
from Github or cocoapods
Import IQKeyboardManagerSwift
in Appdelegate
Add the below lines of code in AppDelegate didFinishLaunchingWithOptions
method.
IQKeyboardManager.sharedManager().shouldResignOnTouchOutside = true;
Objective-C
IQKeyBoardManager
via any medium#import "IQKeyboardManager.h"
in Appdelegate
Add the below lines of code in AppDelegate didFinishLaunchingWithOptions
method.
IQKeyboardManager.sharedManager.shouldResignOnTouchOutside = true;
And this is Done. This is the only code which you need to write.