Latest 0.1.0
Homepage https://github.com/thanyalukj/THJAlertController
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

Version
License
Platform

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 https://github.com/dbettermann/DBAlertController 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.

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.

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": "https://github.com/thanyalukj/THJAlertController",
    "license": "MIT",
    "authors": {
        "Thanyaluk Jirapech-umpai": "[email protected]"
    },
    "source": {
        "git": "https://github.com/thanyalukj/THJAlertController.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