UITableView – scroll to the top

In my table view I have to scroll to the top. But I cannot guarantee that the first object is going to be section 0, row 0. May be that my table view will start from section number 5. So I get an exception, when I call: [mainTableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:NO]; Is there … Read more

UITableViewCell, show delete button on swipe

How do I get the delete button to show when swiping on a UITableViewCell? The event is never raised and the delete button never appears. 19 s 19 During startup in (-viewDidLoad or in storyboard) do: self.tableView.allowsMultipleSelectionDuringEditing = false Override to support conditional editing of the table view. This only needs to be implemented if … Read more

Why is there extra padding at the top of my UITableView with style UITableViewStyleGrouped in iOS7

Starting in iOS7, there is additional space at the top of my UITableView‘s which have a style UITableViewStyleGrouped. Here is an example: The tableview starts at the first arrow, there are 35 pixels of unexplained padding, then the green header is a UIView returned by viewForHeaderInSection (where the section is 0). Can anyone explain where … Read more

Using Auto Layout in UITableView for dynamic cell layouts & variable row heights

How do you use Auto Layout within UITableViewCells in a table view to let each cell’s content and subviews determine the row height (itself/automatically), while maintaining smooth scrolling performance? 2 28 TL;DR: Don’t like reading? Jump straight to the sample projects on GitHub: iOS 8 Sample Project – Requires iOS 8 iOS 7 Sample Project … Read more