jivadevoe/UIAlertView-Blocks — pull request #8 by madninja (2011-11-04 23:40:44+00:00)
Title: Add support for cancel and destructive bits to items

When you call the standard constructor passing in a cancel and destructive button item and then add additional button items, they destructive and cancel items end up at the top of the action sheet.

In order to control the order of cancel and destructive I added two property flags to RIButtonItem. When adding an item to an action sheet or alertview this bit determines whether the added item is tagged for cancel or delete status.

This allows exact control over the order added and what each button's status is. I know this could be done with the addButtonItem returned index, but this way it's all encapsulated in the button item itself.

You like?