I\'m looking to create a category to replace delegate methods with callbacks blocks for a lot of the simple iOS APIs. Similar to the sendAsyc block on NSURLConnection. There are
I had a similar problem and chose your option 2, but with the 2 small additions:
Explicitly marking the delegate it implements like this:
@interface __DelegateBlock:NSObject
Check to ensure the callback is not nil before calling:
if (callbackBlock != nil) { callbackBlock(buttonIndex); }