Opening the Settings app from another app

前端 未结 17 2189
傲寒
傲寒 2020-11-22 01:37

Okay, I know that there are many question about it, but they are all from many time ago.

So. I know that it is possible because the Map app does it.

In the M

17条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-22 02:24

    In Swift 3 / iOS 10+ this now looks like

    if let url = URL(string: "App-Prefs:root=LOCATION_SERVICES") {
        UIApplication.shared.open(url, completionHandler: .none)
    }
    

提交回复
热议问题