iphone - Getting a reference to the UIApplication delegate -


I am writing my first iPhone application and I am having trouble changing the scenes. I have 2 ideas and a reference to each in the AppDelegate ( UIApplicationDelegate ) I make examples of both in applicationDidFinishLaunching and Immediately show the scene first. It works fine

The problem is in reference to AppDelegate and I do not know how it gets referenced, so I can switch to another view. Itemprop = "text">

Yes, UIApication is a singleton, and uses the normal singleton pattern for the objective-c:

  [UIApplication sharedApplication];  

You can get your delegate class directly:

  MyAppDelegate * delegate = (MyAppDelegate *) [[UIApplication sharedApplication] delegate];  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -