Skip to content

iPhone SDK "Tip of the Day" #1 — Accessing the application delegate class

April 9, 2010

To access the appDelegate within another class:

[[UIApplication sharedApplication] delegate]

For example, if you want to call a method within the delegate you may:

[[[UIApplication sharedApplication] delegate] doSomething];

That is all.

(I will hopefully be doing a blog format like this more often with easy to read ‘quick tips’.)

Advertisements

From → regular

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: