Is it okay to have the AppDelegate as an instance variable in a UIViewController
? Like @property (nonatomic, weak) AppDelegate *appDelegate;
Why I'm asking is because I need to access it quite often so instead of doing:
AppDelegate *appDelegate = (AppDelegate *) [[UIApplication sharedApplication] delegate];
[appDelegate doSomething];
I could do:
[appDelegate doSomething]