https://github.com/geri-borbas/ios.library.eppz_alert
Simplest UIAlertView wrapper ever.
https://github.com/geri-borbas/ios.library.eppz_alert
Last synced: about 2 months ago
JSON representation
Simplest UIAlertView wrapper ever.
- Host: GitHub
- URL: https://github.com/geri-borbas/ios.library.eppz_alert
- Owner: Geri-Borbas
- Created: 2013-06-15T13:43:37.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-10-28T13:10:02.000Z (over 11 years ago)
- Last Synced: 2025-01-17T16:16:27.303Z (3 months ago)
- Language: Objective-C
- Size: 196 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
##  eppz!alert
Simplest UIAlertView wrapper ever.
```Objective-C
[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](https://github.com/eppz/eppz-alert/blob/master/eppz!alert/EPPZAlert%2BFactory.h#L20), so you can make it more explicit like these calls below.
```Objective-C
[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](http://en.wikipedia.org/wiki/MIT_License).[](http://githalytics.com/eppz/eppz-alert)
[](https://bitdeli.com/free "Bitdeli Badge")