Handling UITableView insets when the keyboard is shown

iOS SDK use notifications when keyboard appears and Apple described it in the article Managing the Keyboard.

Apple’s code is implemented by the view controller that manages the scroll view. Here is the implementation when you need to use UITableView (please note that code from github was embedded):

I forked it and converted to Swift (please note that code from github was embedded):

I’ll use this method in my next version of Shopping Cart Tracker iPhone App.

Leave a Reply