简体   繁体   中英

How to customize location service using request alert

I want to use an customized alert like the Weather app

天气

instead of the default alert

在此输入图像描述

How can i do? Thanks in advance

You have to add NSLocationAlwaysUsageDescription or NSLocationWhenInUseUsageDescription key in your plist file:

See below picture:

在此输入图像描述

After adding these keys in your plist file remove app from device or simulator and run it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM