Skip to content
This repository has been archived by the owner on Feb 27, 2019. It is now read-only.

Commit

Permalink
Merge branch 'show-me-in-disabled-alert'
Browse files Browse the repository at this point in the history
  • Loading branch information
nickoneill committed Jan 14, 2016
2 parents fcc6ef2 + c70db11 commit 01babdb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions PermissionScope/PermissionScope.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,14 @@ typealias resultsForConfigClosure = ([PermissionResult]) -> Void
alert.addAction(UIAlertAction(title: "OK".localized,
style: .Cancel,
handler: nil))
alert.addAction(UIAlertAction(title: "Show me".localized,
style: .Default,
handler: { action in
NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("appForegroundedAfterSettings"), name: UIApplicationDidBecomeActiveNotification, object: nil)

let settingsUrl = NSURL(string: UIApplicationOpenSettingsURLString)
UIApplication.sharedApplication().openURL(settingsUrl!)
}))

dispatch_async(dispatch_get_main_queue()) {
self.viewControllerForAlerts?.presentViewController(alert,
Expand Down

0 comments on commit 01babdb

Please sign in to comment.