Subclassing UIButton (Composition over inheritance example)

I have created a custom class, preferring composition over inheritance and it works perfect. My custom class has a button and it knows it’s MCContact object. Also it draws a proper button and calculates frames automatically using MCContact object, that is passed.

Header file sample:

Implementation file:

dispatch_after code sample

Apple GCD Reference

How to center a View (ImageView) inside a UITableViewCell