I have a Tab Bar Application, with an MKMapView on one tab’s-view (FirstView.xib & FirstViewController.h/.m), and a normal view with labels on it on the other tab’s-view (SecondView.xib).
I have an active CoreLocation running and updating in my FirstViewController. I need the CoreLocation Variables in on my SecondView as well. It has to display speed, altitude, lat/lon on the SecondView.xib.
How must I approach this? Should I have a ViewController for the SecondView as well? Maybe with another instance of CoreLocation? Or is it better to update the secondview’s labels from within FirstViewController? (I don’t know how to implement the second option – i.e. controlling two xib’s from one controller.)
Thanks in advance!
You should try putting the you
CLLocationmanager within your tab view controller. Then when it updates, it walks the tab views to see if they answer to a location update method you specify. That way it can handle 1, 2,…n views that need the location information.In your tab view controller: