iOS7-safe UIAlertController
To run the example project, clone the repo, and run pod install
from the Example directory first.
IDAlertController uses UIAlertController-like syntax:
IDAlertController *alertController = [IDAlertController alertControllerWithTitle:@"Hello world" message:nil preferredStyle:IDAlertControllerStyleActionSheet];
[alertController addActionWithTitle:@"Cancel" style:IDAlertActionStyleCancel handler:^(IDAlertAction *action) {
NSLog(@"Cancel");
}];
[alertController addActionWithTitle:@"Destructive" style:IDAlertActionStyleDestructive handler:^(IDAlertAction *action) {
NSLog(@"Destructive");
}];
[alertController addActionWithTitle:@"Option one" style:IDAlertActionStyleDefault handler:^(IDAlertAction *action) {
NSLog(@"Option one");
}];
[alertController addActionWithTitle:@"Option two" style:IDAlertActionStyleDefault handler:^(IDAlertAction *action) {
NSLog(@"Option two");
}];
[alertController show];
- ARC
IDAlertController is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "IDAlertController"
Ivan Damjanović, ivan.damjanovic@number26.de
IDAlertController is available under the MIT license. See the LICENSE file for more info.