I\'m writing my first iPhone application and I\'m having trouble switching views. I have 2 views and a reference to each in the AppDelegate (an instance of
AppDelegate
Yes, UIApplication is a singleton, and uses the normal singleton pattern for Objective-C:
[UIApplication sharedApplication];
You can get your delegate class directly from it:
MyAppDelegate *delegate = (MyAppDelegate *)[[UIApplication sharedApplication] delegate];