Latest 0.1.0
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit


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 looked around and found which is what I want. The only problem is I need objective-c version. So, I created THJAlertController which is a subclass of UIAlertController create a new UIWindow and UIViewController on top of the current UIWindow.


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



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

pod "THJAlertController"


Thanyaluk Jirapech-umpai


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

Latest podspec

    "name": "THJAlertController",
    "version": "0.1.0",
    "summary": "A UIAlertController that display on without the need of view controller.",
    "description": "                    A subclass of UIAlertController that create its own UIWindow and rootViewController on top of the app UIWindow.n                    So, the alert could be presented without specifying the parent UIViewController to present one.n",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Thanyaluk Jirapech-umpai": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.1.0"
    "platforms": {
        "ios": "8.0"
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "public_header_files": "Pod/Classes/**/*.h",
    "frameworks": "UIKit"

Pin It on Pinterest

Share This