preface: Meaning is to create a more versions compatible with similar to UIAlertView controls pic example:
Gif example:
- iOS 7.0 available after
- Header Image (optional)
- Title, des (optional)
- Low coupling (present new controller)
- Animation with UIKit Dynamics
- Provide the expansion of the more interesting and powerful features
- Add
pod 'XTAlertViewController', '~> 1.0.1'
to your Podfile - Run
pod install
or pod update --no-repo-update import <XTAlertView.h>
// init obj
// Give a picture name
// Give a picture's height
// Give a btn's title array
// Give a title
// Give a describtion
// Give a style two btn | double btn
// example 1
[[XTAlertViewController new] showViewWithImage:@"summerxx" imageHeight:188 title:@"This is an introduction" btnTitles:@[@"Cancel", @"Determine"] des:@"A simple and easy to use more version using the controls Copyright © 2016年 夏天然后. All rights reserved." style:AlertDefault fromVC:self];
// example 2
XTAlertViewController *xtAlert = [[XTAlertViewController alloc] init];
[xtAlert showViewWithImage:@"summerxx" imageHeight:188 title:@"This is an introduction" btnTitles:@[@"Cancel", @"Determine", @"Okey"] des:@"A simple and easy to use more version using the controls Copyright © 2016年 夏天然后. All rights reserved." style:AlertDouble fromVC:self];
xtAlert.delegate = self;
// Signed an delegate
@interface ViewController ()<XTAlertControllerDelegate>
//
xt.delegate = self;
- (void)xt_alertViewControllerClickIndex:(NSInteger)buttonIndex
{
switch (buttonIndex) {
case 0:
NSLog(@"0");
NSLog(@"Cancel");
break;
case 1:
NSLog(@"1");
NSLog(@"Determine");
break;
case 2:
NSLog(@"2");
NSLog(@"summerxx");
break;
default:
break;
}
}
- If you need help, open an issue.
- If you found a bug, open an issue.
- If you have a new demand, also open an issue.
Made with by summerxx27 , Thank you for your use
XTAlertController is available under the MIT license. See the LICENSE file for more info.