Latest 2.3.3
Homepage https://github.com/VictorZhang2014/ZRAlertController
License MIT
Platforms ios , requires ARC
Frameworks UIKit
Authors

A delightful alert view framework that being compatible with iOS 7.0 and later.
It has the version both Objective-C and Swift.

How to install and get Started with CocoaPods

platform :ios, '7.0'  

pod 'ZRAlertController', '~> 2.3.3'

Usage of first style

[[ZRAlertController defaultAlert] alertShowWithTitle:@"Note" message:@"This is an empty message!" okayButton:@"Ok"];

Effect Photo

ZRAlertController Effect Photo 1

Usage of second style

[[ZRAlertController defaultAlert] alertShowWithTitle:@"Note" message:@"This is an empty message!" cancelButton:@"Cancel" okayButton:@"Ok" okayHandler:^{
    NSLog(@"You clicked the okay button.");
} cancelHandler:^{
    NSLog(@"You clicked the cancel button.");
}];

Effect Photo

ZRAlertController Effect Photo 2

Usage of third style

[[ZRAlertController defaultAlert] alertShowWithTitle:@"Note" message:@"This is an explanation message!" cancelButton:@"Cancel" okayButton:@"Okay" alertStyle:ZRAlertStyleSecureTextInput placeHolder:@"Type any character" okayHandler:^(UITextField *textFiled) {
    NSLog(@"Your input of textFiled is %@.", textFiled.text);
} cancelHandler:^(UITextField *textFiled) {
    NSLog(@"Your input of textFiled is %@.", textFiled.text);
}];

Effect Photo

ZRAlertController Effect Photo 3

Usage of fourth style

[[ZRAlertController defaultAlert] alertShowWithTitle:@"Note" 
                                  message:@"This is an explanation message!" 
                                  cancelButton:@"Cancel" okayButton:@"Ok" 
                                  alertStyle:ZRAlertStyleLoginAndPasswordInput 
                                  placeHolder1:@"Type an account" 
                                  placeHolder2:@"Type a passcode" 
                                  sureHandler:^(UITextField *textFiled1, UITextField *textFiled2) {
    NSLog(@"Your input of Sure textFiled1.text = %@, textFiled2.text = %@. ", textFiled1.text, textFiled2.text);
} abolishHandler:^(UITextField *textFiled1, UITextField *textFiled2) {
    NSLog(@"Your input of Abolish textFiled1.text = %@, textFiled2.text = %@. ", textFiled1.text, textFiled2.text);
}];

Effect Photo

ZRAlertController Effect Photo 4

Usage of first style action sheet

[[ZRAlertController defaultAlert] actionViewWithTitle:nil cancel:@"cancel" others:@[@"aaa",@"bbb",@"ccc"] handler:^(int index, NSString * _Nonnull item) {
    NSLog(@"index = %d, item = %@. ", index, item);
}];

Effect Photo

ZRAlertController Effect Photo 1

Latest podspec

{
    "name": "ZRAlertController",
    "version": "2.3.3",
    "license": "MIT",
    "homepage": "https://github.com/VictorZhang2014/ZRAlertController",
    "authors": {
        "Victor Zhang": "[email protected]"
    },
    "summary": "UIAlertController provides alert view functions.",
    "source": {
        "git": "https://github.com/VictorZhang2014/ZRAlertController.git",
        "tag": "2.3.3"
    },
    "platforms": {
        "ios": null
    },
    "source_files": "Classes/ZRAlertController.{h,m}",
    "frameworks": "UIKit",
    "requires_arc": true
}

Pin It on Pinterest

Share This