i want to know if it's possible to implement following behaviors:
take sy开发者_运维知识库stem app "Map" for instance: 1. user turned off location service from system preferences 2. user runs Map app 3. Map app will detect that location service is disabled, it pops an alert. if user clicks on the ok button from the alert view, it will redirect to Location Service settings in system references.
I just want to know how to do step 3 in my app
PS: i know the code to detect if locatio service is enabled or not
many thanks!
This is not recommended behaviour by the iOS Human Interface Guidelines:
"The alert does not allow users to make this change within the app; instead, they must go to Settings and change their preference. This ensures that users are fully aware that they are granting systemwide permission to use their location information."
http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/TechnologyUsage/TechnologyUsage.html#//apple_ref/doc/uid/TP40006556-CH18-SW1
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]];
精彩评论