Alert-ActionSheet
自定义 AlertView 和 ActionSheet
此库为原生 iOS 的 alertView & actionSheet 提供了一种替代方案,支持自定义 alertView 的外观。
## 安装
CocoaPods
将 pod 'TKAlert&TKActionSheet' 添加到您的 Podfile 或如果您喜欢冒险,可以使用 pod 'TKAlert&TKActionSheet', :head。
手动
- 将
TKAlert&TKActionSheet
文件夹拖入您的项目中。
## 特性
- 兼容 ios 5+
- 像系统 alert 那样工作。
- 在 iPhone 和 iPad 上均可运行。
- 自定义 alert 的外观。
- 自动旋转。
- MIT 许可证 (您可以使用它用于商业应用,修改和再分发)。
使用方法
让我们从一个简单的例子开始
TKAlertViewController *alert = [TKAlertViewController alertWithTitle:@"test" message:@"自定义AlertView和ActionSheet. cocoapads 使用 pod 'TKAlert&TKActionSheet', '~>1.0.1'"];
[alert addButtonWithTitle:@"ok" handler:^{
}];
[alert addButtonWithTitle:@"cancel" handler:nil];
alert.dismissWhenTapWindow = YES;
[alert showWithAnimationType:TKAlertViewAnimationPathStyle];
维护者
许可
Alert-ActionSheet 在MIT许可下可用。有关更多信息,请参阅LICENSE文件。