问题
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