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 04-20-2009, 06:24 PM   #2 (permalink)
p.witty
New Member
 
Join Date: Apr 2009
Posts: 4
Default

Quote:
Originally Posted by coondog View Post
The only place I can think to put that code (so it will be global) is in the AppDelegate, but, is that bad form?
Well, Chris, I came here to ask almost the exact same question!

Many controllers need to access the same object instances. From what I've seen online, it seems everyone just puts these instances in their AppDelegate. This doesn't really sit well with me, but the only other solution I can think of is to make my classes instance-aware, so that I can grab the appropriate instance via static methods on my classes. But THAT also seems like an ugly solution. (Though I like it a little bit better than relying on AppDelegate.)

So if someone out there would enlighten us as to best practices, I think it would be valuable for everyone who happens across this thread.

Thanks.

Last edited by p.witty; 04-20-2009 at 06:24 PM. Reason: Fixing the quote
p.witty is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,333
Threads: 39,129
Posts: 171,562
Top Poster: smasher (2,577)
Welcome to our newest member, SteveMc
Powered by vBadvanced CMPS v3.1.0

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