Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Stormy Location Manager Help
Following the Idea of single responsibility principle, I want to make Location Service as a singleton class. Which includes methods for finding current location and a method for reverse geocoding.
The problem I'm experiencing is that, CLLocationManagerDelegates does not have any completion handler. therefor when I instantiate the Location Service in the ViewDidLoad method, the app doesn't wait for the location service to get a fix.
Is there a way for me to make the app wait? Or Am I doing this all wrong.
My Idea was that when the app launches, The location service is called in the ViewDidLoad method.And wait until the location service returns a location. (Sorry for my bad English)