问题
I'm planning to make an app for ios7, and have an issue with the administrativeArea Placemark Attribute.
For iOS6 i get the full name of the administrative area (ex. "California"), but for the iOS7, I get the value of "CA". This is a problem when its so varying. Is there any way I can control this input so its more consistent?
The apple docs doesnt eigher explain this in details.. http://developer.apple.com/library/mac/documentation/CoreLocation/Reference/CLPlacemark_class/Reference/Reference.html#//apple_ref/occ/instp/CLPlacemark/administrativeArea
Thanks!
回答1:
You can only parse it to uoy needed value. I can offer you find the list of administrative areas with full name and with little. After you can add this in 2 .txt files, import them in project,create 2 NSArrays and initialize each array in cycle. After you can check administrative area name and return right value.
来源:https://stackoverflow.com/questions/18300419/varying-content-with-clplacemark-administrativearea-ios6-ios7