Calculate distance of user's current location and a specific city

最后都变了- 提交于 2019-12-25 08:57:15

问题


I have to get current location of my user and I have done it by using CLLocationManager. I can get user's current city or area. I have an array of cities and have to check that which city is closest to the current location of user. Is it possible and if yes then how I can achieve it.

EDIT: I have to show some deals or offers on the basis of user's location. If user is not from the city which is in my list, then I have to find out the nearest city and have to show offers from that city.

来源:https://stackoverflow.com/questions/23243554/calculate-distance-of-users-current-location-and-a-specific-city

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!