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

Commit 01babdb

Browse files
committed
Merge branch 'show-me-in-disabled-alert'
2 parents fcc6ef2 + c70db11 commit 01babdb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

PermissionScope/PermissionScope.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,14 @@ typealias resultsForConfigClosure = ([PermissionResult]) -> Void
11671167
alert.addAction(UIAlertAction(title: "OK".localized,
11681168
style: .Cancel,
11691169
handler: nil))
1170+
alert.addAction(UIAlertAction(title: "Show me".localized,
1171+
style: .Default,
1172+
handler: { action in
1173+
NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("appForegroundedAfterSettings"), name: UIApplicationDidBecomeActiveNotification, object: nil)
1174+
1175+
let settingsUrl = NSURL(string: UIApplicationOpenSettingsURLString)
1176+
UIApplication.sharedApplication().openURL(settingsUrl!)
1177+
}))
11701178

11711179
dispatch_async(dispatch_get_main_queue()) {
11721180
self.viewControllerForAlerts?.presentViewController(alert,

0 commit comments

Comments
 (0)