THJAlertController 0.1.0

THJAlertController 0.1.0

测试经过测试
语言语言 Obj-CObjective C
许可 MIT
发布最近发布2016年11月

Thanyaluk Jirapech-umpai 维护。



  • 作者
  • Thanyaluk Jirapech-umpai

在任何 UIViewController 顶部显示的 UIAlertView。

从 UIAlertView 移至 UIAlertController 并不有趣,因为两者基础不同。iOS 将 UIAlertView 视为 UIView 的子类,并将其置于 UIWindow 之上。现在,UIAlertController 是 UIViewController 的子类。要显示警报,我们需要从 UIViewController 调用 - presentViewController:animated:completion:

由于旧代码并不总是将 UIAlertView 显示在 UIViewController 内(例如,一些处理位置服务的单例类等),所以我需要一个类似于 UIAlertView 的 AlertController,可以显示在应用的任何地方。

因此,我创建了 THJAlertController,它是 UIAlertController 的子类,创建一个新的 UIWindow 和 UIViewController 在现有 UIWindow 之上。

用法

要运行示例项目,请克隆代码库,然后从 Example 目录运行 pod install

要求

安装

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

pod "THJAlertController"

作者

Thanyaluk Jirapech-umpai

许可

THJAlertController 在 MIT 许可下可用。有关更多信息,请参阅 LICENSE 文件。