LEAlertController 0.1.7

LEAlertController 0.1.7

测试已测试
Lang语言 Obj-CObjective C
许可 MIT
发布最新发布2015年4月

Lasha Efremidze维护。




概述

LEAlertController 是一个轻量级的 扩展,支持 iOS 7。在 iOS 7 上回退到使用 UIActionSheet

UIAlertView Screenshot UIActionSheet Screenshot

用法

安装

LEAlertController 通过 CocoaPods 提供。要安装它,只需将以下行添加到 Podfile 中。

pod "LEAlertController"

要运行示例项目,请克隆仓库,然后从示例目录首先运行 pod install

示例

一样使用

LEAlertController *alertController = [LEAlertController alertControllerWithTitle:@"Default Style" message:@"A standard alert." preferredStyle:LEAlertControllerStyleAlert];

LEAlertAction *cancelAction = [LEAlertAction actionWithTitle:@"Cancel" style:LEAlertActionStyleCancel handler:^(LEAlertAction *action) {
    // handle cancel button action
}];
[alertController addAction:cancelAction];

LEAlertAction *defaultAction = [LEAlertAction actionWithTitle:@"OK" style:LEAlertActionStyleDefault handler:^(LEAlertAction *action) {
    // handle default button action
}];
[alertController addAction:defaultAction];

[self presentAlertController:alertController animated:YES completion:nil];

许可

LEAlertController 根据 MIT 许可证提供。请参阅 LICENSE 文件获取更多信息。