UITableView Disclosure Indicator on a UIButton

Although it is non-standard. I needed to match pixel-perfect to a design, so I created this. On a UITableView it is called ‘Disclosure Indicator’ as opposed to the one available from UIButton which is ‘Detail Disclosure’.

table_indicator

It is 50×80 with a transparent background. Use this image on top of a button or UIImageView. Resize it to whatever size you’d like your button to be. Apple recommends a hit target of no less than 40×40. I sized it to 10×16 in my storyboard, but I am using a transparent button overlay so the size doesn’t matter.

yourButton = [UIButton buttonWithType :UIButtonTypeCustom];
 [yourButton setImage:[UIImage imageNamed:@"table_indicator.png"]   ForState:UIControlStateNormal];

Or make the setting in the Xcode Attributes Inspector (middle button that looks like a ring or a ram).
Screen Shot 2013-04-17 at 11.42.55 AM

Remember that a button has multiple states and you can set!

Question source:http://stackoverflow.com/questions/13836606/use-table-view-disclosure-indicator-style-for-uibutton-ios/16066430#16066430