UIAlertView like “Turn On Location Services to all

2019-01-17 17:09发布

I Want to emit this alert:

Turn On Location Services to allow maps to determine your location

I need both "Settings" and "Cancel" exactly like the "maps" application.

"Settings" should open settings->general->location services

I didn't find the way to open the settings page.

Can you help me?

Thanks

7条回答
成全新的幸福
2楼-- · 2019-01-17 18:12

This is not possible to accomplish on your own. However, if your application needs to access location services the OS will present a dialog like this for you as seen below.

Edit: Brant mentioned below that "the message can be customized by setting the value of the purpose property on your CLLocationManager."

alt text

查看更多
登录 后发表回答