0

I have an app that requires Geocoding from a string to lat/long values, I use the geocoder from the iOS class reference:

http://developer.apple.com/library/ios/#documentation/CoreLocation/Reference/CLGeocoder_class/Reference/Reference.html#//apple_ref/occ/cl/CLGeocoder

but the completion handler gets called after I need it to be (namely I have code that uses those lat/long values, but is getting called before they are available)

any thoughts?

tshepang
  • 12,111
  • 21
  • 91
  • 136
Uba Duba
  • 241
  • 2
  • 12

1 Answers1

0

Put the code that uses the lat-long into the geocoder's completion handler. That's what it's for.

nevan king
  • 112,709
  • 45
  • 203
  • 241
  • hmm, there's an idea. so in general there's no "delay" type option? – Uba Duba Mar 19 '13 at 12:22
  • No, there's no delay option. It's always delayed since geocoding is a network operation. The code in the completion block is only executed after the geocode finishes. – nevan king Mar 19 '13 at 12:47