简体   繁体   中英

iOS redirect to Setting Home page

I am trying to redirect to Settings home page. The code that I am writing is:

-(void)openDeviceSettings{
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil];
}

However, this opens the Settings app. If I open General in Settings and then use this function again, it will redirect to the General Settings.

What I would like to achieve is to either redirect to Settings home page. Could someone please help with this.

You can open settings app programmatically use this

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

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