best way to use CoreLocation across multiple views

Posted by Matt on Stack Overflow See other posts from Stack Overflow or by Matt
Published on 2011-01-15T23:09:05Z Indexed on 2011/01/15 23:54 UTC
Read the original article Hit count: 143

Filed under:
|
|
|
|

I have two views in my app, one is a general view where CoreLocation works away calculating the users location while the user is doing other stuff in the view. The second view is accessed by the user when they touch a button allowing them to locate themselves more accurately using a mapview and MapKit, i would like the mapview in this view to show the location that CoreLocation has already identified in the first view AND to continue displaying this location based on updates from CoreLocation in the other view.

Is the best way here to create a singleton that encapsulates the CoreLocation stuff and have this referenced in the view with the map, or to use notifications ? or to use some other better practice for my scenario ?

Thanks

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c