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

后端 未结 6 1570
不知归路
不知归路 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:32

    In iOS 8 and later you can send the user to your app's settings in the following way:

    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
    

提交回复
热议问题