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:06 PM   #1 (permalink)
coondog
Goon (on a good day)
 
Join Date: Apr 2009
Location: California
Posts: 55
Default Where to put global data and processing code?

Hi everyone,

I'm making a little app based on the "pickers" sample project from the "Beginning iPhone Development" book.

The book's example is basically how to use the UITabBarController and, in this case, the app has five unrelated views, one linked to each Tab and each view's data is processed and output to it's view through that view's controller.

So, the book's example structure looks like this:
AppDelegate
--View1Controller
--View2Controller
--View3Controller
--View4Controller

In my app, however, most of the views are related to one another and will thus share data. For example, one tab will give you a Search Screen and your selection from the search results will take you to another tab that will display data based on that result.

My questions are:

Where do I code-up the processing/data-population of the search result so it can be accessed by the other views? The only place I can think to put that code (so it will be global) is in the AppDelegate, but, is that bad form?

I can certainly figure out how to get the job done, I guess my question is more of a design problem or a best practices question...

Anyway, thank you for any advice.

Chris.
coondog is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Online Users: 277
16 members and 261 guests
adison, Bertrand21, bravetarget, falcon76, ForrestShi, iSdkDev, jordanclark1993, leeus, LemonMeringue, lepetitapps, ltgbau, pereorra, rajeshgautam, refreshe, Tambourin, warcrow
Most users ever online was 779, 05-11-2009 at 09:55 AM.
» Stats
Members: 24,226
Threads: 39,006
Posts: 171,094
Top Poster: smasher (2,570)
Welcome to our newest member, mellisakelien54
Powered by vBadvanced CMPS v3.1.0

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