The UIAlertviewDelegate protocol has several optional methods including:
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonInd
#import "MLAlertView.h" @implementation MLAlertView -(void)dismissWithClickedButtonIndex:(NSInteger)buttonIndex animated:(BOOL)animated { } -(void)dismissNow:(NSInteger)buttonIndex { [super dismissWithClickedButtonIndex:buttonIndex animated:YES]; }