- 1.The simplest UIAlertView replacement. You can use it just write one line of code.
- 2.Don't be afraid that the length of message is too long. There is a UITextView to show long message automatically.It supports line break.
- 3.Support queue to manager alertViews .
- 4.Nice blur background .
- 5.Block syntax.
- 6.Support iOS 6 and greater.
- 7.Please add Accelerate.framework before use.
[JCAlertView showOneButtonWithTitle:@"title" Message:@"message" ButtonType:JCAlertViewButtonTypeDefault ButtonTitle:@"button" Click:^{
NSLog(@"click0");
}];
[JCAlertView showTwoButtonsWithTitle:@"title" Message:@"message" ButtonType:JCAlertViewButtonTypeCancel ButtonTitle:@"button0" Click:^{
NSLog(@"click0");
} ButtonType:JCAlertViewButtonTypeDefault ButtonTitle:@"button1" Click:^{
NSLog(@"click1");
}];
[JCAlertView showMultipleButtonsWithTitle:@"title" Message:@"message" Click:^(NSInteger index) {
NSLog(@"click%zi", index);
} Buttons:@{@(JCAlertViewButtonTypeDefault):@"index = 0"},@{@(JCAlertViewButtonTypeCancel):@"index = 1"},@{@(JCAlertViewButtonTypeWarn):@"index = 2"}, nil];
UIView *customView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 150)];
JCAlertView *customAlert = [[JCAlertView alloc] initWithCustomView:customView dismissWhenTouchedBackground:YES];
[customAlert show];
Use [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
in every ViewController
, when you use JCAlertView the statusBarStyle will not be changed.