"We are suffering from this plague," they said, "while he is paying that man for a useless hobby!"
All Table Views
On retina screens, when you ask for a certain row height (by setting
tableView.rowHeight or using
tableView:heightForRowAtIndexPath: delegate method), your UITableViewCell’s contentView really gets .5pts less than that. The .5pts are devoted to the bottom border. (the bottom border, by the way, is a 0.5pt height UIView of type _UITableViewCellSeparatorView.) Plain table view cells do not have a top border.
A UITableViewCell has a single subview of type UITableViewCellScrollView that contains everything else (presumably to implement the swipe-left-to-delete interaction).
Just Grouped Table Views
When they don’t have section header text, both section headers and section footers have a default height of 17.5pts. Except for the first section header and the last section footer, which have default heights of 35pts (when they don’t contain text). This makes sense since the first section header has no section footer before it and the last section footer has no section header after it. They give it 35pts to be consistent with the default inter-section space comprised of a section footer (17.5pts) and section header (17.5pts).
On retina screens, the first cell of a section also has a top border that takes up another 0.5pts of your row height. Unlike with the bottom border, though, another 0.5pts of height isn’t taken away from your cell’s contentView. The top border is just later in the cell’s subviews array so it covers up the first 0.5pts of your contentView. Well, at least contentViews don’t have slightly different heights as a function of their position in the table view like in iOS 6.
I’ve independently spoken about each of these four ideas to someone at some point in the past year.
Thanks, Bret, for putting them together in one shareable talk.
"Home is a beautiful thing, etc." A photo album.
Somewhere in Portland, there’s a very old building.
The main reason to read this book is for the honesty with which Feynman speaks to you. It’s as if you were having a conversation with him–the kind of great conversation that is had with an open-minded, brilliant and personable person.
— Richard Feynman, “What Do You Care What Other People Think?”