I am extremely confident that Apple will introduce the ability to set blocks as actions for UIActionSheet (and UIAlertView) in iOS 6. Still, for exercise and because I want to support iOS 5 until iOS 6 is actually released, I set out to implement that.
When I tweeted about it, several people pointed me to existing implementations:
- Gustavo Ambrozio’s BlockAlertsAnd-ActionSheets
- Zachary Waldowski’s BlocksKit
- UIAlertView-Blocks
- Yuri Kotov’s ADVAlertView-Blocks
- Mugunth Kumar’s UIKitCategoryExtensions
So I could have used one of these. BUT I like to understand the code I’m using and also I’m still learning, so better to solve the problem myself and talk about it. Also there are some implementation choices that I don’t agree with on these projects.