UITapGestureRecognizer breaks UITableView didSelectRowAtIndexPath

I have written my own function to scroll text fields up when the keyboard shows up. In order to dismiss the keyboard by tapping away from the text field, I’ve created a UITapGestureRecognizer that takes care of resigning first responder on the text field when tapping away. Now I’ve also created an autocomplete for the … Read more

How to deselect a selected UITableView cell?

I am working on a project on which I have to preselect a particular cell. I can preselect a cell using -willDisplayCell, but I can’t deselect it when the user clicks on any other cell. – (void)tableView:(UITableView*)tableView willDisplayCell:(UITableViewCell*)cell forRowAtIndexPath:(NSIndexPath*)indexPath { AppDelegate_iPad *appDelegte = (AppDelegate_iPad *)[[UIApplication sharedApplication] delegate]; if ([appDelegte.indexPathDelegate row] == [indexPath row]) { [cell … Read more

Can I force a UITableView to hide the separator between empty cells? [duplicate]

This question already has answers here: Eliminate extra separators below UITableView (34 answers) Closed 5 years ago. When using a plain-style UITableView with a large enough number of cells that the UITableView cannot display them all without scrolling, no separators appear in the empty space below the cells. If I have only a few cells … Read more

How to disable scrolling in UITableView table when the content fits on the screen

I have a few (grouped style) tables in my iphone app (only on part of the screen and added with Interface Builder though, not subclassed from UITableViewController) that 80% of the time are small and will fit on the screen. When the table fits on the screen, I’d like to disable scrolling, to make it … Read more