How to open Location services screen from setting screen?

前端 未结 11 2093
别那么骄傲
别那么骄傲 2020-12-04 14:01

I want to open location service screen programmatically to turn on service.

11条回答
  •  粉色の甜心
    2020-12-04 15:03

    Step 1: Click on project name >> target>> info >> url Types

    Step 2:

    -(IBAction)openSettingViewToEnableLocationService:(id)sender
    {
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]];
    }
    

提交回复
热议问题