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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development > iPhone SDK Development - Advanced Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 06-10-2010, 09:28 AM   #1 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 3
Cardinal is on a distinguished road
Post Application Architecture

I'm new to iPhone development. (Been doing .NET development for 8 years)

I'm building an app, and am having trouble with the architecture of the application.

My first screen has 8 buttons on it, that each go to different views. Some of these views are table views with data from a Core Data entity.

Do I need to setup a view controller for each of these different table views? I think that i do, but not sure. Also, does each different view controller also needs its own delegate class?

If anybody knows of a sample app that has this type of functionality, that would be helpful too.

Thank you very much.
Cardinal is offline   Reply With Quote
Old 06-11-2010, 03:56 PM   #2 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 6
ratbastid is on a distinguished road
Default

Quote:
Originally Posted by Cardinal View Post
Do I need to setup a view controller for each of these different table views? I think that i do, but not sure. Also, does each different view controller also needs its own delegate class?
The most likely design will be one controller class for each view.

Only those things that need delegates need delegates, and your basic UIViewController subclass doesn't. You can think of a delegate as a designated target class for named callbacks.

For instance: UITableView has a number of delegate methods it calls to get its data and to report user interaction, and it's customary to have the UIViewController that controls that view be the table's delegate. SO customary, in fact, that there's a UIViewController subclass called UITableViewController that combines those two things for you.
ratbastid is offline   Reply With Quote
Old 06-15-2010, 06:56 PM   #3 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 78
bigdiggyiPhone is on a distinguished road
Default

Hi,

I think it really depends on how common the data and presentation will be for those tableViews. If they are very similar, then I would use the same viewController and just modify the properties of the viewController and load the appropriate tableViewCells based upon the dataset that you are loading.

This is not trivial to do, but it is possible. With a little bit of work up front architecting it, you can make a fairly reusable class that can be adapted to the situation at hand.

Good luck,

T

Quote:
Originally Posted by Cardinal View Post
I'm new to iPhone development. (Been doing .NET development for 8 years)

I'm building an app, and am having trouble with the architecture of the application.

My first screen has 8 buttons on it, that each go to different views. Some of these views are table views with data from a Core Data entity.

Do I need to setup a view controller for each of these different table views? I think that i do, but not sure. Also, does each different view controller also needs its own delegate class?

If anybody knows of a sample app that has this type of functionality, that would be helpful too.

Thank you very much.
__________________
Check out my apps:
  • Friis-It NF. Easily calculate the Noise Figure, Sensitivity, and gain of an RF receiver design.
  • RetireMax. Get a dose of reality about that next purchase!
bigdiggyiPhone is offline   Reply With Quote
Reply

Bookmarks

Tags
core data, table view, view controller

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 365
6 members and 359 guests
.Snipe, AragornSG, baja_yu, guusleijsten, hussain1982, Paul Slocum
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,645
Threads: 94,111
Posts: 402,862
Top Poster: BrianSlick (7,990)
Welcome to our newest member, leighec68
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:33 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0