How can I open the Settings app when the user presses a button?

后端 未结 6 1563
不知归路
不知归路 2020-12-06 06:38

From what I understand by using code like this:

NSURL* appUrl = [NSURL URLWithString: @\"URL\"];
[[UIApplication sharedApplication] openURL:appUrl];
<         


        
6条回答
  •  眼角桃花
    2020-12-06 07:08

    Swift Syntax:

    UIApplication.sharedApplication().openURL(NSURL(string: UIApplicationOpenSettingsURLString)!)
    

提交回复
热议问题