Latest 0.1.1
Homepage https://github.com/mattga/MGAlertUtility
License MIT
Platforms ios
Authors

Pod Version
License

A simple utility class with static methods for presenting a UIAlertController.

Examples

OK Alert

[MGAlertUtility showOkAlertWithMessage:@"Check the provided email for further instructions."
                                 title:@"Account created"
                              okAction:^(UIAlertController *alert, UIAlertAction *action) {
                                NSLog(@"User pressed %@", action.title);
                              }];

YesNo Alert

[MGAlertUtility showYesNoAlertWithMessage:@"What is this"
                                    title:@"idk"
                                   onView:self
                                 okAction:^(UIAlertController *alert, UIAlertAction *action) {
                                   NSLog(@"some action '%@'", action.title);
                                 }];

Action Sheet Alert

[MGAlertUtility showCancelActionSheet:@"Hello"
                              message:@"How are you?"
                              actions:@{
                                        @"Action 1" : ^(UIAlertController *alert, UIAlertAction *action) {
                                          NSLog(@"First Action: %@", action.title);
                                        }, 
                                        @"Action 2" : ^(UIAlertController *alert, UIAlertAction *action) {
                                          NSLog(@"Second Action: %@", action.title);
                                        }
                              }];

Latest podspec

{
    "name": "MGAlertUtility",
    "version": "0.1.1",
    "summary": "An iOS Utility for presenting alerts",
    "description": "A simple utility class with static methods for presenting a UIAlertController.",
    "homepage": "https://github.com/mattga/MGAlertUtility",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Matthew Gardner": "[email protected]"
    },
    "platforms": {
        "ios": null
    },
    "source": {
        "git": "https://github.com/mattga/MGAlertUtility.git",
        "tag": "v0.1.1"
    },
    "header_mappings_dir": "MGAlertUtility",
    "source_files": "MGAlertUtility/**/*.{h,m}"
}

Pin It on Pinterest

Share This