Skip to content

Geri-Borbas/iOS.Library.eppz_alert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 

Repository files navigation

eppz!tools eppz!alert

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."]; }]; }];

License

Licensed under the Open Source MIT license.

githalytics.com alpha Bitdeli Badge

About

Simplest UIAlertView wrapper ever.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published