How to open settings app programmatically?

后端 未结 3 767
半阙折子戏
半阙折子戏 2020-12-15 22:00

I\'m using swift with ios 8.3. I want to open settings app from my application. I know that using the code

UIAp         


        
3条回答
  •  情话喂你
    2020-12-15 22:45

    Try this.

    if let appSettings = URL(string: UIApplication.openSettingsURLString) {
        UIApplication.shared.open(appSettings, options: [:], completionHandler: nil)
    }
    

    Xcode 11.5 - iOS > 10

提交回复
热议问题