Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-10-2009, 03:45 AM   #4 (permalink)
ftm
FasterThanMonkeys.com
iPhone Dev SDK Supporter
 
Join Date: Mar 2009
Location: Southern California
Posts: 521
Send a message via AIM to ftm
Default

Quote:
Originally Posted by ovidiu View Post
Yes, but I want to use the appdelegate in a lot of methods inside the applications, I don't like to write that whole line. I just wanted to use a shorter version, which is appDelegate.
How about just creating a #define like this:

Code:
#define  APPDELEGATE   ((MyAppDelegate*)[[UIApplication sharedApplication] delegate])
Now anywhere you want to access the App Delegate, just use "APPDELEGATE" in code.
__________________


Website: http://fasterthanmonkeys.com

iScore Baseball Scorekeeper Top baseball scorekeeping app for iPhone
Bug Squash Reached #1 kids game in 15+ countries including USA, now with OpenFeint
Jam Packed! Fun puzzle game for all ages
Jam Packed Christmas Holiday puzzle game!
iScore Basketball Scorekeeper Best basketball scorekeeping application
ftm is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 23,873
Threads: 38,649
Posts: 169,646
Top Poster: smasher (2,547)
Welcome to our newest member, JBTech
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:26 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.