AAAlertController 0.2.1

AAAlertController 0.2.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release May 2017

Maintained by aozhimin.



logo

Overview

AAAlertController is a lightweight UI component to present a popup style dialog, it provide alert style and action sheet style. It's easy to use and integrate in your project. The API is just like UIAlertController which you will see the usage in demo

Sample project

We provided sample project, To run the it, after you clone the repo, open the workspace file.

Demo

Requirements

AAAlertController works on iOS 7.0+ and requires ARC to build.

Installation

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

pod "AAAlertController"

and edit pod file, install AAAlertController into your project just excute command as follow:

pod install

Usage

(see the usage which I put in the sample project)

AAAlertStyleAlert

    AAPresentViewController *popupVC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil]
                                        instantiateViewControllerWithIdentifier:@"AAAlertStyleViewController"];
        popupVC.view.frame = CGRectMake(0, 0, 300, 280);
    AAAlertController *alertController =
    [[AAAlertController alloc] initWithContentViewController:popupVC
                                           andPreferredStyle:AAAlertStyleAlert
                                          andAnimationOption:animationOption];
    [self presentViewController:alertController animated:YES completion:nil];

AAAlertStyleStyleActionSheet

    AAPresentViewController *popupVC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil]
                                        instantiateViewControllerWithIdentifier:@"AAActionSheetStyleViewController"];
        popupVC.view.frame = CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), 200);
    AAAlertController *alertController =
    [[AAAlertController alloc] initWithContentViewController:popupVC
                                           andPreferredStyle: AAAlertStyleStyleActionSheet
                                          andAnimationOption:animationOption];
    [self presentViewController:alertController animated:YES completion:nil];

Author

Author Gmail Twitter
Alex Ao [email protected] @Alex Ao

License

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