iOS - Customize Table View Cells

Ever wanted to have alternated colors on your table view cells? If so, you've probably done something inside of cellForRowAtIndexPath and applied a background color to your cell there. Would you be surprised to know that's completely wrong? Yup. Wrong. WRONG WRONG WRONG. I didn't know this, but any styles applied to cells based on state or whatever should really be in willDisplayCell - NOT when you configure the cell itself! Per Apple's documentation for the Table View delegate - ...

July 7, 2011 · 1 min · Aaron