THJAlertController 0.1.0

THJAlertController 0.1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Nov 2016

Maintained by Thanyaluk Jirapech-umpai.



  • By
  • Thanyaluk Jirapech-umpai

UIAlertController that displays on top of any UIViewController.

Moving away from UIAlertView to UIAlertController is not fun because the fundamental of UIAlertView and UIAlertController is so different. iOS treats UIAlertView as a subclass of UIView and put it on top of UIWindow for us. UIAlertController is now a subclass of UIViewController. To present the alert, we need to call - presentViewController:animated:completion: from the UIViewController.

Since legacy codes does not always present UIAlertView inside the UIViewController (ie. some singleton classes dealing with location service, etc.) So, I need a UIAlertController that could display anywhere on top of the app like UIAlertView used to do.

So, I created THJAlertController which is a subclass of UIAlertController create a new UIWindow and UIViewController on top of the current UIWindow.

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

THJAlertController is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "THJAlertController"

Author

Thanyaluk Jirapech-umpai

License

THJAlertController is available under the MIT license. See the LICENSE file for more info.