Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3457500
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:52:03+00:00 2026-05-18T09:52:03+00:00

The View controller programming guide states this regarding view controller’s usage: Each custom view

  • 0

The View controller programming guide states this regarding view controller’s usage:

Each custom view controller object you
create is responsible for managing all
of the views in a single view
hierarchy. In iPhone applications, the
views in a view hierarchy
traditionally cover the entire screen,
but in iPad applications they may
cover only a portion of the screen.
The one-to-one correspondence between
a view controller and the views in its
view hierarchy is the key design
consideration. You should not use
multiple custom view controllers to
manage different portions of the same
view hierarchy
. Similarly, you
should not use a single custom view
controller object to manage multiple
screens worth of content.

I understand that if we use multiple custom view controller’s to control the parts of a view (i.e. a view controller to manage subViews of a main view which in turn is managed by a view controller) the default methods like:

didReceiveMemoryWarnings
viewWillAppear
viewWillDisappear
viewDidUnload

etc. etc. will not be called.

Apart from this, is there any other solid reason why we should not be using multiple view controllers to manage the respective subviews of a view?

The documentation also provide an alternative solution which reads as:

Note: If you want to divide a view
hierarchy into multiple subareas and
manage each one separately, use
generic controller objects (custom
objects descending from NSObject)
instead of view controller objects to
manage each subarea. Then use a single
view controller object to manage the
generic controller objects.

But there is no mention as to why multiple view controllers should not be preferred. My question is:

Why should not we prefer it this way?

I am concerned because I prefer using UIViewController’s subclass to manage my views since I load them from nib each time and I segregate nibs for each view controllers. It becomes easy to cater the changes in later stages of the project. Is this wrong? Should I necessarily change my programming style, or is it ok if I go ahead with this approach?

Thanks,

Raj

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T09:52:04+00:00Added an answer on May 18, 2026 at 9:52 am

    Well, I’d say “as long as it works”, you can keep on doing like you do !
    But to keep things “cleaner”, I’d use my own objects.
    Since ViewControllers are designed with other general features in mind (like working with navigation controllers and tab bar controllers), which makes it a bit “heavy” for a simple usage, like you do.
    Plus, like you mentioned, some events are only called when the viewController’s view is added to the main window.

    Can’t you use your own objects with Interface Builder ? If you create one (or several) UIView IBOutlet(s), it should work the same.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From Apple's View Controller Programming Guide / Managing Memory Efficiently; didReceiveMemoryWarning Use this method
Apple has provided an example the View Controller Programming Guide, for creating an UITabBarItem,
According to the View Controller Programming Guide, delegation is the preferred method to dismiss
In my view controller's -viewDidLoad method, I call [myTextField becomeFirstResponder]; This works like a
I was trying to follow the Table View Programming Guide for iPhone OS but
I've created a custom UITableViewCell in IB, linked it to the root view controller's
I realise that the view/controller stuff will be different between Mac and IPhone apps
A simple question: I have a Model-View-Controller setup, with Models accessing a SQL database.
What are the alternative design methods to the Model View Controller? MVC seems to
My application is pretty simple: it starts up with a view controller that holds

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.