如下是跳转到系统设置诸多界面的url
prefs:root=General&path=About
prefs:root=General&path=ACCESSIBILITY
prefs:root=AIRPLANE_MODE
prefs:root=General&path=AUTOLOCK
prefs:root=General&path=USAGE/CELLULAR_USAGE
prefs:root=Brightness
prefs:root=General&path=Bluetooth
prefs:root=General&path=DATE_AND_TIME
prefs:root=FACETIME
prefs:root=General
prefs:root=General&path=Keyboard
prefs:root=CASTLE
prefs:root=CASTLE&path=STORAGE_AND_BACKUP
prefs:root=General&path=INTERNATIONAL
prefs:root=LOCATION_SERVICES
prefs:root=ACCOUNT_SETTINGS
prefs:root=MUSIC
prefs:root=MUSIC&path=EQ
prefs:root=MUSIC&path=VolumeLimit
prefs:root=General&path=Network
prefs:root=NIKE_PLUS_IPOD
prefs:root=NOTES
prefs:root=NOTIFICATIONS_ID
prefs:root=Phone
prefs:root=Photos
prefs:root=General&path=ManagedConfigurationList
prefs:root=General&path=Reset
prefs:root=Sounds&path=Ringtone
prefs:root=Safari
prefs:root=General&path=Assistant
prefs:root=Sounds
prefs:root=General&path=SOFTWARE_UPDATE_LINK
prefs:root=STORE
prefs:root=TWITTER
prefs:root=General&path=USAGE
prefs:root=VIDEO
prefs:root=General&path=Network/VPN
prefs:root=Wallpaper
prefs:root=WIFI
prefs:root=INTERNET_TETHERING
使用方法:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=General&path=Keyboard"]];
然而不幸的是,ios 5.1之后系统不再支持这些url跳转调用到系统。
引用
Yep, saw this (and many more), even implemented it in a test application. Really need to get the definative word from APPL, but the community concensus opinion is APPL disallowed it in 5.1 after it was publically "discovered/published", so applications containing it won't be accepted.
08/01/12 Update: Asked Apple through my developer account if there is a way to programmatically launch the WiFi Settings dialog. Here is the response:
"Our engineers have reviewed your request and have concluded that there is no supported way to achieve the desired functionality given the currently shipping system configurations."
From:
http://stackoverflow.com/questions/8246070/ios-launching-settings-restrictions-url-scheme
所以,要么我们干脆干掉这个功能。要么,变态了。
- (void) showLocationAlert {
if ([CLLocationManager authorizationStatus] != kCLAuthorizationStatusAuthorized) {
//Check whether Settings page is openable (iOS 5.1 not allows Settings page to be opened via openURL:)
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]]) {
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Error" message:@"You must enable location service,Turn on location service to allow \"YourApp\" to determine your location" delegate:self cancelButtonTitle:@"Settings" otherButtonTitles:@"Cancel", nil];
[alert show];
}
else {
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Error" message:@"You must enable location service" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil];
[alert show];
}
}
}
- (void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == 0) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]];
}
}
From:
http://stackoverflow.com/questions/12398688/location-service-alert
分享到:
相关推荐
在iOS开发中,有时我们需要通过代码来控制应用的行为,例如在特定条件下打开系统设置的某个界面,以便用户能够快速配置相关功能。在这个场景中,"iOS7 系统跳转蓝牙界面"是一个重要的知识点,主要涉及到如何在iOS7...
此外,附录中列出了iOS10及以后版本支持的一些其他系统设置的跳转写法,例如蓝牙、蜂窝移动数据、个人热点、通知、通用设置等。这些URL Scheme可以帮助开发者在应用中方便地引导用户进入相应的系统设置界面,提高...
总而言之,"最新上万个创意设计图标Brilliant PNG icons.rar"这个资源包为设计师提供了丰富的选择,无论是在开发新的应用、优化现有界面还是构建设计系统时,都能找到合适的图标元素,提高设计效率和质量。...
2. **跨平台支持:**Qt Quick 支持多种操作系统,包括Windows、macOS、Linux以及移动操作系统如Android和iOS。 3. **高性能:**Qt Quick 通过利用硬件加速技术,提供了流畅的动画效果和图形渲染能力。 4. **丰富的...
软件环境: iOS9.1硬件环境: Mac OS X 10.11开发工具: Xcode7.1 项目描述: 模板是“喜马拉雅FM”,因为很喜欢这个软件的风格和内容,当时这款软件参杂着太多的广告以及推广。所以打算通过抓包,并Json解析出数据...