IOS applies the method of setting the interface of the internal jump system

  • 2020-05-15 02:10:53
  • OfStack

In the development of iOS, sometimes there are requirements for the interface of the jump system setting, such as prompting the user to open bluetooth or WIFI, and reminding the user to open push or location permission. After iOS6, the third application needs to jump to the system setting interface, and it needs to add an prefs value in URL type, as shown below:


The jump system Settings the items in the root directory using the following method:


_array = @[
@{@" System Settings ":@"prefs:root=INTERNET_TETHERING"},
@{@"WIFI Set up the ":@"prefs:root=WIFI"},
@{@" The bluetooth Settings ":@"prefs:root=Bluetooth"},
@{@" The system informs ":@"prefs:root=NOTIFICATIONS_ID"},
@{@" General Settings ":@"prefs:root=General"},
@{@" Display Settings ":@"prefs:root=DISPLAY&BRIGHTNESS"},
@{@" Wallpaper Settings ":@"prefs:root=Wallpaper"},
@{@" Sound Settings ":@"prefs:root=Sounds"},
@{@" Privacy Settings ":@"prefs:root=privacy"},
@{@"APP Store":@"prefs:root=STORE"},
@{@"Notes":@"prefs:root=NOTES"},
@{@"Safari":@"prefs:root=Safari"},
@{@"Music":@"prefs:root=MUSIC"},
@{@"photo":@"prefs:root=Photos"}
];
NSURL * url = [NSURL URLWithString:[_array[index] allValues].firstObject];
[[UIApplication sharedApplication]openURL:url];

If you want to jump to the Settings screen of the third party application, use prefs:root=boundleId. boundleId is boundleId for the third party application.

If you need to continue to jump to the inner layer of the project, you can do so by adding the path path as follows:


_array = @[
@{@" About the machine ":@"prefs:root=General&path=About"},
@{@" Software upgrade ":@"prefs:root=General&path=SOFTWARE_UPDATE_LINK"},
@{@" Date/time ":@"prefs:root=General&path=DATE_AND_TIME"},
@{@"Accessibility":@"prefs:root=General&path=ACCESSIBILITY"},
@{@" Keyboard Settings ":@"prefs:root=General&path=Keyboard"},
@{@"VPN":@"prefs:root=General&path=VPN"},
@{@" Wallpaper Settings ":@"prefs:root=Wallpaper"},
@{@" Sound Settings ":@"prefs:root=Sounds"},
@{@" Privacy Settings ":@"prefs:root=privacy"},
@{@"APP Store":@"prefs:root=STORE"},
@{@" Restore Settings ":@"prefs:root=General&path=Reset"},
@{@" Application of notification ":@"prefs:root=NOTIFICATIONS_ID&path= The application of boundleId"}
];

The above content introduced the IOS application jump system Settings related interface method, I hope to help you!


Related articles: