Simplest UIAlertView wrapper ever.
[EPPZAlert alertWithTitle:@"Alert!"
message:@"Please choose a task below."
buttonTitles:@[@"Clean", @"Upload", @"Cancel"]
completition:^(NSString *selectedButtonTitle)
{
if ([selectedButtonTitle isEqualToString:@"Clean"])
[self clean];
if ([selectedButtonTitle isEqualToString:@"Upload"])
[self upload];
}];
Added some factory presets trough a category EPPZAlert+Factory, so you can make it more explicit like these calls below.
[EPPZAlert alertWithTitle:@"Select an answer!"
message:nil
yes:^() { [EPPZAlert alertWithTitle:@"That was a Yes!" message:@"You can belive me."]; }
no:^() { [EPPZAlert alertWithTitle:@"That was a No!" message:@"When I say to you."]; }
cancel:^() { [EPPZAlert alertWithTitle:@"That was a Cancel!" message:@"I can easily recognize."]; }]; }];
Licensed under the Open Source MIT license.