Accessing AppDelegate instance

AppDelegate object can access from any class in the same application like below. Methods or properties shared between controllers can be defined under application delegates.

SomeAppDelegate *appDelegate
  = (SomeAppDelegate *)[[UIApplication sharedApplication] delegate];

No comments yet.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.