Solved

Switching to a possible 10 views - how many view controllers?

Posted on 2010-09-01
1
534 Views
Last Modified: 2013-11-25
I'm writing a "guide" style app which will display static content dependant on what category the user selects. From the main menu there is an option of reading/displaying 10 different views each loaded from 10 different buttons. Each view will contain text and some graphics (nothing heavy).

What's the best way of doing this?

Should I have one view controller for all or one view controller for each view?
0
Comment
Question by:nickedwards
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
xdomains earned 500 total points
ID: 33583742
You can decide to select between a single view controller or multiple view controllers based on these -

a) Data that the model is going to handle: If the data can be seggregated to be independent for each views, then you can go for multiple models, views and controllers. If you have any interdependencies between the data, then it best not to split them across models

b) Even if you have a single data model, it is perfectly fine to have multiple view-controllers. This is much cleaner, and you will have excellent control on what you want to do with the view. This will be highly maintainable and light weight while executing, because only the necessary views need to be loaded. You should keep a controller for each view, again for the maintainability aspects. This will also enable you to abstract and encapsulate the business logic behind the views.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question