{"title":"Creating the iOS 5 UITableView Bevel Effect","html_url":"https://deallocatedobjects.com/posts/creating-the-ios-5-uitableview-bevel-effect","source_url":"http://www.tim-oliver.com/2011/10/23/creating-the-uitableview-bevel-effect-in-coregraphics/","markdown_content":"Oh man, I wish I had found [Tim Oliver](https://twitter.com/#!/Tim0liver)'s [writeup about this](http://www.tim-oliver.com/2011/10/23/creating-the-uitableview-bevel-effect-in-coregraphics/) sooner (includes diagrams and sample code).\r\n\r\nI just wrote all of this code myself, and had to do all of my own research. Serves me right for not properly Googling.\r\n\r\n*Pro Tip*: Google everything before you begin coding a solution for a problem you assume everyone in your field must have.\r\n\r\nYou see, in iOS 5, Apple refreshed the look of a standard `UITableViewStyleGrouped` style `UITableView`. (You know, the ones with the rounded corners). \r\n\r\nNo longer were they actually white (like `255, 255, 255` or `#FFFFFF`). They were now a refreshing shade of `255, 255, 255, 0.8`. That's still pure white, but with an opacity of *80%*. Also, they added a 1 point tall drop shadow, as well as a 1 point tall inner shadow to each `UITableViewCell`. They've also still got a 1 point border around them.\r\n\r\nI actually think the new cells looks *much* better, but they definitely break any custom code anyone had written to make their own custom UI or buttons match `UIKit`'s.\r\n\r\nI can't tell you how often I need to replicate this look and feel. Glad someone put together [a comprehensive article about the topic](http://www.tim-oliver.com/2011/10/23/creating-the-uitableview-bevel-effect-in-coregraphics/).\r\n\r\n*Pro Tip #2*: This is a pretty small detail, and sure, most people probably won't even notice. However, in my own anecdotal side-by-side tests, I was able to get an <i>Oh this looks much better!</i> reaction out of people by simply making my custom drawn stuff correctly match the system drawn bits.","html_content":"<p>Oh man, I wish I had found <a href=\"https://twitter.com/#!/Tim0liver\">Tim Oliver</a>‘s <a href=\"https://web.archive.org/web/20111130221631/http://www.tim-oliver.com/2011/10/23/creating-the-uitableview-bevel-effect-in-coregraphics/\">writeup about this</a> sooner (includes diagrams and sample code).</p>\n\n<p>I just wrote all of this code myself, and had to do all of my own research. Serves me right for not properly Googling.</p>\n\n<p><em>Pro Tip</em>: Google everything before you begin coding a solution for a problem you assume everyone in your field must have.</p>\n\n<p>You see, in iOS 5, Apple refreshed the look of a standard <code>UITableViewStyleGrouped</code> style <code>UITableView</code>. (You know, the ones with the rounded corners). </p>\n\n<p>No longer were they actually white (like <code>255, 255, 255</code> or <code>#FFFFFF</code>). They were now a refreshing shade of <code>255, 255, 255, 0.8</code>. That’s still pure white, but with an opacity of <em>80%</em>. Also, they added a 1 point tall drop shadow, as well as a 1 point tall inner shadow to each <code>UITableViewCell</code>. They’ve also still got a 1 point border around them.</p>\n\n<p>I actually think the new cells looks <em>much</em> better, but they definitely break any custom code anyone had written to make their own custom UI or buttons match <code>UIKit</code>‘s.</p>\n\n<p>I can’t tell you how often I need to replicate this look and feel. Glad someone put together <a href=\"https://web.archive.org/web/20111130221631/http://www.tim-oliver.com/2011/10/23/creating-the-uitableview-bevel-effect-in-coregraphics/\">a comprehensive article about the topic</a>.</p>\n\n<p><em>Pro Tip #2</em>: This is a pretty small detail, and sure, most people probably won’t even notice. However, in my own anecdotal side-by-side tests, I was able to get an <i>Oh this looks much better!</i> reaction out of people by simply making my custom drawn stuff correctly match the system drawn bits.</p>","created_at":"2013-11-16T05:10:25.599Z","updated_at":"2013-11-16T05:10:25.599Z"}