Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

Graves Robber
($1.99)

African Adventure
($0.99)

iTazer
($0.99)

ArtStudio
($3.99)

Pigs Vs Wolves
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 04-27-2009, 08:30 PM   #22 (permalink)
exorcyze
Registered Member
 
Join Date: Dec 2008
Posts: 495
Default

I'm not sure I have a solution that I'm 100% happy with yet, but I had gotten tired of having to keep adding things to track to the app delegate. I also try to not overuse singletons, and since there is already one handy ( thanks to the AppDelegate ), I simply made a DataManager class that would handle the application data.

In many other languages you'll see a class like that being a singleton so it can be used to access / manage data from anywhere. But since we already have our singleton, I simply made an instance of that as a property of the AppDelegate - then referenced data properties and methods from within there.

Coupling that with FMDB for database access simplified my code and consolodated it to one handy place without making my delegate all cloudy.

Would love to hear any better approaches though. =)
__________________
My Apps on AppStore : gScale (guitar scales reference), eMaze, eMaze Lite, eTimesheet
exorcyze is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Online Users: 318
16 members and 302 guests
CunningCat, Eskema, Gismo, hawksz, hrom, HUngable, ipodishima, LemonMeringue, Leopard, oldmicah, RichardFu, shuvo1879, simpsonaty, xot-dog, yahya.sadiiq, yunas
Most users ever online was 779, 05-11-2009 at 10:55 AM.
» Stats
Members: 23,721
Threads: 38,484
Posts: 169,070
Top Poster: smasher (2,541)
Welcome to our newest member, oldmicah
Powered by vBadvanced CMPS v3.1.0

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