Latest 0.0.1
Homepage https://github.com/suninrain086/XWAlertController
License MIT
Platforms ios 7.0
Dependencies JRSwizzle, Masonry
Frameworks Foundation, UIKit
Authors

Description

XWAlertController provides similar API like UIAlertController, you can also use the same API for iOS7.

Installation

From CocoaPods

pod 'XWAlertController'

Examples

You can use XWAlertController like the following example:

    XWAlertController *alert = [XWAlertController alertControllerWithTitle:@"Title"
                                                                   message:@"This is message for AlertController"
                                                            preferredStyle:XWAlertControllerStyleAlert];
    [alert addAction:[XWAlertAction actionWithTitle:@"OK" style:XWAlertActionStyleDefault handler:^(XWAlertAction * _Nonnull action) {
        NSLog(@"Action1");
    }]];

    [alert addAction:[XWAlertAction actionWithTitle:@"Cancel" style:XWAlertActionStyleDestructive handler:^(XWAlertAction * _Nonnull action) {
        NSLog(@"Action2");
    }]];

    [self presentViewController:alert animated:YES completion:NULL];

License

The source code is distributed under the nonviral MIT License. It’s the simplest most permissive license available.

Version History

  • v0.0.1: May 2 2016

Latest podspec

{
    "name": "XWAlertController",
    "version": "0.0.1",
    "summary": "use XWAlertController to replace UIAlertController.",
    "description": "XWAlertController provides similar API like UIAlertController, you can also use the same API for iOS7.",
    "homepage": "https://github.com/suninrain086/XWAlertController",
    "license": "MIT",
    "authors": {
        "suninrain086": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/suninrain086/XWAlertController.git",
        "tag": "0.0.1"
    },
    "source_files": [
        "Pod/Classes",
        "Pod/Classes/**/*.{h,m}"
    ],
    "exclude_files": "Pod/Classes/Exclude",
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "dependencies": {
        "JRSwizzle": [
            "~> 1.0"
        ],
        "Masonry": [
            "~> 1.0.0"
        ]
    }
}

Pin It on Pinterest

Share This