与 UIAlertController 兼容的 iOS >= 5.0
ARAlertController 通过 CocoaPods 提供。要安装它,只需向您的 Podfile 添加以下行
pod 'ARAlertController'
ARAlertController.m
ARAlertController.h
要运行示例项目,请克隆仓库,然后从 Example 目录首先运行 pod install
ARAlertController *alert = [ARAlertController alertControllerWithTitle:@"My Alert" message:@"This is an alert." preferredStyle:ARAlertControllerStyleAlert];
ARAlertAction* defaultAction = [ARAlertAction actionWithTitle:@"OK" style:ARAlertActionStyleDefault handler:^(ARAlertAction * action) {}];
[alert addAction:defaultAction];
[alert presentInViewController:self animated:YES completion:nil];
通过 @alexruperez 关注作者,并查看 alexruperez 的博客: http://alexruperez.com
ARAlertController 在 MIT 许可下可用。有关更多信息,请参阅 LICENSE 文件。