CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✗ |
| LangLanguage | Obj-CObjective C |
| License | MIT |
| ReleasedLast Release | Dec 2014 |
Maintained by Unclaimed.
ALActionBlocks is an Objective-C category on UIControl and UIBarButtonItem that allows for handling of control events with blocks.
This category was inspired by Dave DeLong's StackOverflow answer.
#import "ALActionBlocks.h"// Assuming you have a UIButton named 'button'
[button handleControlEvents:UIControlEventTouchUpInside withBlock:^(id weakControl) {
NSLog(@"button pressed");
}];[button removeActionBlocksForControlEvents:UIControlEventTouchUpInside];That's it!
Check out the demo project for more details.
ALActionBlocks is compatible with iOS 5.0 and above.
Yuuuup!
ALActionBlocks is available under the MIT license.