I was trying to call an existing method of my ViewController.m
from AppDelegate.m
inside the applicationDidEnterBackground
method,
The view controller is already instantiated as part of the NIB/storyboard process, so if your app delegate does its own alloc
/init
, you are simply creating another instance (which bears no relation to the one created the NIB/storyboard).
The purpose of the construct you outline is merely to give the app delegate a reference to the view controller that the NIB/storyboard instantiated for you.