TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Oct 2016 |
Maintained by Victor Zhang.
A delightful alert view framework that being compatible with iOS 7.0 and later. It has the version both Objective-C and Swift.
[[ZRAlertController defaultAlert] alertShowWithTitle:@"Note" message:@"This is an empty message!" okayButton:@"Ok"];
[[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.");
}];
[[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);
}];
[[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);
}];
[[ZRAlertController defaultAlert] actionViewWithTitle:nil cancel:@"cancel" others:@[@"aaa",@"bbb",@"ccc"] handler:^(int index, NSString * _Nonnull item) {
NSLog(@"index = %d, item = %@. ", index, item);
}];