Skip to content
No description or website provided.
Objective-C Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
MGAlertUtility
Screenshots
.DS_Store
Gemfile
Gemfile.lock
LICENSE
MGAlertUtility.podspec
README.md

README.md

MGAlertUtility

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);
                                        }
                              }];
You can’t perform that action at this time.