I'm trying to turn off location services in applicationDidEnterBackground, messaging my Stop... method in another vc of my storyboard. I've tried the technique in: Storyboard - refer to ViewController in AppDelegate but my understanding is that this creates a new instance of the respective VC rather than a reference to the current instance, and I confirmed this by nslogging the addresses of the original controller and the reference in AppDelegate. They are different so the method does not stop my location services. Is my understanding of vc instances correct?
I see the technique used in the Regions sample code (https://developer.apple.com/library/ios/samplecode/Regions/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010726), in brief:
@class RegionsViewController;
@property (nonatomic, retain) IBOutlet RegionsViewController *viewController;
...
@synthesize viewController;
self.window.rootViewController = self.viewController;
[viewController.locationManager stopUpdatingLocation];
But this uses nibs, so I can't figure out how to convert that code. It seems to rely on originally instantiating the location VC from appdelegate, so the one and only instance occurs from appdelegate, whereas my storyboard app, if I understand it, instantiates my location VC implicitly on its own. Playing with the Regions code, logging the respective addresses from AppDelegate and RegionsViewController shows the matching values, as expected, so the location services instance is stopped. So can someone tell me the storyboard equivalent of the Regions technique?
Thanks