Posts

Showing posts from December, 2015

UITableView with Keyboard handling for UITextFields

UITableView has its parent class as UIScrollView. So, if you have a UITableViewCell , which has UITextField, then it needs to handle the contentOffset. More details on contentOffset  ( another url )and keyboard handling   in iOS. Lets say if we want to add a bottom inset of 216 (approx. kyeboard height). the following would be the code You basically change the content Offset while the content size remains the same. self.contentOffset = UIEdgeInset(0,0,216,0). This will move the content ( in the UITableView) up by 216. The below code also handles autosuggestion bar ,  as the autosuggestion delta (approx. 29) gets added to existing delta. And Removes it accordingly. -( void )viewWillAppear:( BOOL )animated{     [ super viewWillAppear :animated];     [ self   registerNotifications: YES ]; } -( void )viewWillDisappear:( BOOL )animated{     [ super viewWillDisappear :animated];     [ self   registerNotifications: NO ]; } -( void )registerNotifications:(