Latest 1.1
Homepage https://github.com/shashankpali/ATZAlertController-ObjC
License MIT
Platforms ios 8.0, requires ARC
Authors

ATZAlertController

ATZAlertController helps you to create an alert from any class without any dependency on ViewController. The name itself derives that it provides A to Z solution towards the UIAlertController with various types of functions you can use them accordingly. ATZAlertController is easy to use and implement.

Pod Installation

CocoaPods is the preferred way to install this library. Add this command to your Podfile:

For Objective C

pod 'ATZAlertController-ObjC'

For Swift.

Direct Installation

Download .zip file and extract it. There you will find the ATZAlertController folder, copy all the files from the folder to your respective project.

Integration Method


#import "ATZAlertController.h"

[ATZAlertController alertWithTitle:@"My Alert"
                           message:@"Array containing object string"
                 cancelButtonTitle:@"Cancel"
            destructiveButtonTitle:@"Remove"
                 otherButtonTitles:@[@"Ok", @"Right"]
                    preferredStyle:UIAlertControllerStyleAlert
                showAlertInstantly:YES
                             block:^(UIAlertAction * _Nonnull action, NSString * _Nonnull titleString) {
                                //your code
                              }];
#import "ATZAlertController.h"

ATZActionButton *button1 = [ATZActionButton actionWithTitle:@"Ok" preferredStyle:UIAlertActionStyleDefault];
ATZActionButton *button2 = [ATZActionButton actionWithTitle:@"Remove" preferredStyle:UIAlertActionStyleDestructive];

ATZAlertController *alert = [ATZAlertController alertWithTitle:@"My Alert"
                                   message:@"Array containing object string"
                         cancelButtonTitle:@"Cancel"
                         otherActionButton:@[button1, button2]
                            preferredStyle:UIAlertControllerStyleAlert
                        showAlertInstantly:NO
                                     block:^(UIAlertAction * _Nonnull action, NSString * _Nonnull titleString) {
                                        //your code
                                      }];

[alert showWithAnimation:NO];

Thanks

License

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

Latest podspec

{
    "name": "ATZAlertController-ObjC",
    "version": "1.1",
    "platforms": {
        "ios": "8.0"
    },
    "license": {
        "type": "MIT"
    },
    "homepage": "https://github.com/shashankpali/ATZAlertController-ObjC",
    "authors": {
        "Shashank Pali": "[email protected]"
    },
    "summary": "Show alert without dependency on ViewController",
    "source": {
        "git": "https://github.com/shashankpali/ATZAlertController-ObjC.git",
        "tag": "1.1"
    },
    "requires_arc": true,
    "source_files": "ATZAlertController/*.{h,m}"
}

Pin It on Pinterest

Share This