Tutorial by Examples

There are few approaches available there: You can subscribe for keyboard appearance events notifications and change offset manually: //Swift 2.0+ override func viewDidLoad() { super.viewDidLoad() NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(YourVCClas...
If you want to hide a keyboard by tap outside of it, it's possible to use this hacky trick (works only with Objective-C): - (void)viewDidLoad { [super viewDidLoad]; // dismiss keyboard when tap outside a text field UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecogn...
This is a basic in-app keyboard. The same method could be used to make just about any keyboard layout. Here are the main things that need to be done: Create the keyboard layout in an .xib file, whose owner is a Swift or Objective-C class that is a UIView subclass. Tell the UITextField to use t...
When I first started managing the keyboard I would use separate Notifications in each ViewController. Notification Method (Using NSNotification): class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() NSNotificationCenter.defaultCenter().a...
Note: This only works for the built-in keyboard provided by iOS SWIFT: In order for the view of a UIViewController to increase the origin of the frame when it is presented and decrease it when it is hidden, add the following functions to your class: func keyboardWillShow(notification: NSNotificat...

Page 1 of 1