Fetching the Application Delegate

When developing for the Mac or the iPhone we frequently run into the situation of needing to grab the delegate.  Thankfully this is stored in a singleton object and very easy to fetch:

#import "MyAppDelegate.h"
MyAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
This entry was posted in Uncategorized. Bookmark the permalink.

Error: The ad management script is not properly configured for this user

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>