/IDAlertController

Primary LanguageObjective-CMIT LicenseMIT

IDAlertController

Version License Platform

iOS7-safe UIAlertController

Usage

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];

Requirements

  • ARC

Installation

IDAlertController is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "IDAlertController"

Author

Ivan Damjanović, ivan.damjanovic@number26.de

License

IDAlertController is available under the MIT license. See the LICENSE file for more info.