LOAlertController 0.1.6

LOAlertController 0.1.6

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2016

Maintained by vivalalova.



  • By
  • vivalalova

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

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

pod "LOAlertController"

Getting start

import

#import "UIAlertController+LOAlertController.h"

One method to set alertController

    [UIAlertController showWithController:self cancelTitle:@"cancel action title" type:UIAlertControllerStyleActionSheet title:@"title" message:@"message" buttons:@[@"action 1 title", @"action 2 title"] complete:^(NSInteger buttonIndex) {
        //return -1 if cancel action pressed
        if (buttonIndex == -1) {
            return;
        }

        //button index as bottons
        switch (buttonIndex) {
            case 0:
                //to something
                break;

            case 1:
                //to something
                break;

            default:
                return;
                break;
        }
    }];

Author

vivalalova, [email protected]

License

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