Problem
AppDelegate内でUIAlertControllerを使ってアラートを表示したい
Solution
DBAlertControllerを使って解決できます。
AppDelegate.swift
import DBAlertController
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// アラートを表示する
let alert = DBAlertController(title: "didFinishLaunchingWithOptions", message: nil, preferredStyle: .Alert)
alert.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil))
alert.show()
}
}