简体   繁体   中英

Xamarin iOS Navigate to Settings

I have been trying to find a way to navigate to navigate from an Application to the Settings preferences for the Application.

I have tried the following, yet unfortunately it does error.

  var root = new UINavigationController (); root.PushViewController (new Uri ("prefs:root=General"), true); 

When trying this, I did believe it would error as it should be used to Navigate to an already made view.

Is there anyway I am able to navigate to the settings application as required via the use of Xamarin C#?

Thanks.

Sorry, you can't. Apple disabled the ability to do this in iOS 5.1.

The only option is creating your own preferences UI and displaying that instead.


Edit: as of iOS 8, you can take the user direct to your app's preferences:

UIApplication.SharedApplication.OpenUrl(new NSUrl(UIApplication.OpenSettingsUrlString))

The following code is working in iPhone.

var url = new NSUrl("prefs:root=Settings");
UIApplication.SharedApplication.OpenUrl(url);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM