.h文件
-(void) handlerClickedButton:(void (^)(NSInteger btnIndex))aBlock;
-(void) handlerCancel:(void (^)(void))aBlock;
-(void) handlerWillPresent:(void (^)(void))aBlock;
-(void) handlerDidPresent:(void (^)(void))aBlock;
-(void) handlerWillDismiss:(void (^)(NSInteger btnIndex))aBlock;
-(void) handlerDidDismiss:(void (^)(NSInteger btnIndex))aBlock;
-(void) handlerShouldEnableFirstOtherButton:(BOOL (^)(void))aBlock;
.m文件
#undef UIAlertView_key_clicked
#define UIAlertView_key_clicked "UIAlertView.clicked"
#undef UIAlertView_key_cancel
#define UIAlertView_key_cancel "UIAlertView.cancel"
#undef UIAlertView_key_willPresent
#define UIAlertView_key_willPresent "UIAlertView.willPresent"
#undef UIAlertView_key_didPresent
#define UIAlertView_key_didPresent "UIAlertView.didPresent"
#undef UIAlertView_key_willDismiss
#define UIAlert