![(logo)](https://camo.githubusercontent.com/7f0e8fbc4c557632321b355dbd0eb149d93e6063ab83bd867dd4949bd7ef3e68/687474703a2f2f696d67312e70682e3132362e6e65742f684e314c793368676f304c543430766b6f5454684b673d3d2f34383937363634353936353732333637362e6a7067)
![(logo)](https://camo.githubusercontent.com/f778c2e4e268aeaf48fc07ed280c644b6cdf9123f4bfa7f27e04f0088a41c637/687474703a2f2f696d67302e70682e3132362e6e65742f6a5532366e5a33785f364c36636454713365654e4f673d3d2f363633303832333637343131393939313738392e6a7067)
![(logo)](https://camo.githubusercontent.com/a4f8ecaa54fbef8f55d094f8aec9bdecdaca15f5ae97dfb4f85fb4a92e53807b/687474703a2f2f696d67322e70682e3132362e6e65742f3276453761736d35366d6756414d725247437a4766673d3d2f363633303433313134383436383135323530342e676966)
- 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.
Add a pod entry for JCAlertView to your Podfile pod 'JCAlertView'
copy the JCAlertView
folder to your project
add Accelerate.framework
to your project
After that, please look at the following codes or download demo directly.
1.Show JCAlertView with 1 button
[JCAlertView showOneButtonWithTitle:@"title" Message:@"message" ButtonType:JCAlertViewButtonTypeDefault ButtonTitle:@"button" Click:^{
NSLog(@"click0");
}];
2.Show JCAlertView with 2 buttons
[JCAlertView showTwoButtonsWithTitle:@"title" Message:@"message" ButtonType:JCAlertViewButtonTypeCancel ButtonTitle:@"button0" Click:^{
NSLog(@"click0");
} ButtonType:JCAlertViewButtonTypeDefault ButtonTitle:@"button1" Click:^{
NSLog(@"click1");
}];
3.Show JCAlertView with more than 2 buttons
[JCAlertView showMultipleButtonsWithTitle:@"title" Message:@"message" Click:^(NSInteger index) {
NSLog(@"click%zi", index);
} Buttons:@{@(JCAlertViewButtonTypeDefault):@"index = 0"},@{@(JCAlertViewButtonTypeCancel):@"index = 1"},@{@(JCAlertViewButtonTypeWarn):@"index = 2"}, nil];
4. Show JCAlertView with customView
UIView *customView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 150)];
JCAlertView *customAlert = [[JCAlertView alloc] initWithCustomView:customView dismissWhenTouchedBackground:YES];
[customAlert show];
If you have any question or suggestion please feel free to connect me. Thank you!