Latest 0.2.1
Homepage https://github.com/hightower/UIAlertController-Show
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation, UIKit
Authors ,

Light-weight extension that adds -show method to UIAlertController. Presenting UIAlertControllers from anywhere, just like UIAlertView.

Example Usage

This extension provides an API for UIAlertController that mimics the interface for UIAlertViews.

Example in Objective-C:

UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Hello"
                                                                         message:@"Just like UIAlertViews!"
                                                                  preferredStyle:UIAlertControllerStyleAlert];

[alertController show];

Example in Swift:

let alertController = UIAlertController(title: "Hello",
                                        message: "Just like UIAlertViews!",
                                        preferredStyle: .Alert))

alertController.show()

Setup via CocoaPods

Add UIAlertController+Show to your Podfile

pod 'UIAlertController+Show'

Then, import the framework where needed.

Objective-C:

@import UIAlertController_Show;

Swift:

import UIAlertController_Show

Latest podspec

{
    "name": "UIAlertController+Show",
    "version": "0.2.1",
    "summary": "Show UIAlertControllers from anywhere.",
    "description": "Light-weight extension to UIAlertController that adds 'show' method for presenting Alerts / Action Sheets from anywhere",
    "homepage": "https://github.com/hightower/UIAlertController-Show",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Erik Ackermann": "[email protected]",
        "Dustin Burge": "[email protected]"
    },
    "social_media_url": "http://twitter.com/erikwithfriends",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/hightower/UIAlertController-Show.git",
        "tag": "0.2.1"
    },
    "source_files": "UIAlertController+Show/UIAlertController+Show.swift",
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "requires_arc": true,
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This