iOS7兼容自定义带动画的AlertViewController
来源:互联网 发布:淘宝保健品规则 编辑:程序博客网 时间:2024/05/16 19:30
preface: Meaning is to create a more versions compatible with similar to UIAlertView controls
pic example:
Gif example:
Advantages
- iOS 7.0 available after
- Header Image (optional)
- Title, des (optional)
- Low coupling (present new controller)
- Animation with UIKit Dynamics
Features
- Provide the expansion of the more interesting and powerful features
Cocoapods
- Add
pod 'XTAlertViewController', '~> 1.0.1'
to your Podfile - Run
pod install
or pod update –no-repo-update import <XTAlertView.h>
Usage
// init obj XTAlertViewController *xt = [[XTAlertViewController alloc] init]; // 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 [xt initWithImage:@"summerxx" imageHeight:0 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:AlterDefault]; [self presentViewController:xt animated:YES completion:^{ }]; // example 2 [xt initWithImage:@"summerxx" imageHeight:200 title:@"This is an introduction" btnTitles:@[@"Cancel", @"Determine", @"summerxx"] des:@"A simple and easy to use more version using the controls Copyright © 2016年 夏天然后. All rights reserved." style:AlterDouble]; // present VC [self presentViewController:xt animated:YES completion:^{ }];
If you use a proxy method
// Signed an delegate @interface ViewController ()<XTAlertControllerDelegate> // xt.delegate = self;
Implement delegate method like this
- (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; }}
Contributing
- 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.
Acknowledgements
Made with by summerxx27 , Thank you for your use
MIT License
XTAlertController is available under the MIT license. See the LICENSE file for more info.
轮子地址- https://github.com/summerxx27/XTAlertVC
0 0
- iOS7兼容自定义带动画的AlertViewController
- 兼容iOs7的自定义alertView
- 兼容iOs7的自定义alertView
- iOS7 自定义动画跳转
- ios7自定义跳转动画
- AlertViewController的使用
- AlertViewController
- iOS7 自定义视图切换动画
- iOS7 自定义视图切换动画
- alertview和alertviewcontroller的关系
- 带动画的ActionBar --------- ToolBar(兼容低版本)
- 带动画的ActionBar --------- ToolBar(兼容低版本)
- 自定义带动画的开关按钮
- 一种带动画自定义控件的封装
- 自定义控件--带动画的CheckBox
- 自定义控件--带动画的CheckBox
- android 自定义dialog 带动画的
- Android 带动画的自定义Toast
- Java 程序员必须收藏的资源大全
- 【转载】CSDN-markdown语法之如何使用LaTeX语法编写数学公式
- 以顺序表存储的大整数运算
- 走进AndroidStudio下的NDK
- Java布局管理器setLayout()
- iOS7兼容自定义带动画的AlertViewController
- js如何实现广告在pc端显示,移动端不显示.直让广告在点上是显示,手机上不显示代码
- 【转载】MarkDown 图片大小问题
- java中使用POI(HSSF)导出excel表格
- 每天一条linux命令 ---cat命令
- C++中二维数组的动态创建与处理
- 【转载】CSDN-markdown编辑器语法——字体、字号与颜色
- 基于SonarQube实现代码扫描的团队定制
- 学习Google Sample 如何给TextView增加超链接