Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.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
 

» Advertisements
» Stats
Members: 158,746
Threads: 89,201
Posts: 380,567
Top Poster: BrianSlick (7,129)
Welcome to our newest member, raKinesic
Powered by vBadvanced CMPS v3.1.0

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