Custom Button Cell

I wrote this custom cell that ultimately was axed because it didn't fit into the UI that was later revised. I thought it was a shame to waste it so here it is in the full.

It works by allowing you to define how buttons should appear in a cell, each is given an equal size and spacing is worked out on the fly. When a button is clicked it fires off a notification indicating that it was pressed which means that the button/cell doesn't care what tableview it is included in so increasing encapsulation.

As my requirements where that all my table cells contained the same number of buttons I was able to pass those in at init. If your needs are for multiple buttons numbers you will need to be more creative and pass it as a property with the setup happening in that custom setter