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 3870860
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T21:46:06+00:00 2026-05-19T21:46:06+00:00

I’ve already created a couple iPhone and iPad apps, but I’ve written them either

  • 0

I’ve already created a couple iPhone and iPad apps, but I’ve written them either with another supporting api or with open source libraries like Cocos2d underneath supporting the scene management and screen transitions. I don’t feel like I’ve quite figured out how screen/scene/view management is supposed to be done without these external apis. Can someone very simply, but clearly explain how an app would manage screen transitions and/or point me to a good reference that demonstrates this with as little clutter as possible?

Should I be using UIViewController-derived classes to separate the screen-by-screen functionality of my app (except for functionality that is already meant to handle multi-screen actions like navigation controllers)? And would my app essentially hand control over to one of these view controllers which would then construct my scene with its components (like labels, buttons, whatever views). How do I switch to the relevant view controller, and should I expect loadView to be called as a result? Then, when some trigger calls for moving to, say, screen B, would a call be made to ‘transition out’ my views, then call forth some other view controller to ‘set up your views’ and transition them in?

If there is a sample program that really illustrates this, preferably without interface builder, that would be ideal.

  • 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-19T21:46:06+00:00Added an answer on May 19, 2026 at 9:46 pm

    Should I be using
    UIViewController-derived classes to
    separate the screen-by-screen
    functionality of my app?

    Yes.

    And would my app essentially hand
    control over to one of these view
    controllers which would then construct
    my scene with its components?

    Yes, although many VCs just get their view tree from a nib, and concern themselves with the core controller responsibilities: 1. propagating model changes into the various view fields; and 2. propagating view events back into appropriate actions on the model. I recommend getting the hang of InterfaceBuilder. It’s imperfect and annoying but it can save you hours of work and reams of code.

    How do I switch to the relevant view controller?

    A number of ways:

    • If your VCs are hosted in a navigation controller, [[self navigationController] pushViewController:theNextVC animated:YES] is a common idiom.
    • Switching among a set of VCs, where there’s no clear hierarchy among them, is best done with a UITabBarController.
    • If you want to do modal stacking, [self presentModalViewController:theNextVC animated:YES] is how. Modal stacks deeper than one or two get unwieldy though.
    • Presenting the very first VC is done in 4.x by assigning it to your window’s rootViewController property (the app delegate can do this, or the main nib can); or for pre-4, the traditional way usually found in the app delegate: [myMainWindow addSubview:[myInitialVC view]].
    • a few specialized apple-provided VCs (video, photo picker) have their own presentation methods.

    Note that with the first two methods, if you want the behavior but not the UI widgets, you can hide the navigation bar or tab bar and do everything programmatically.

    should I expect loadView to be called as a result?

    It will, but most of your “I’m appearing now!” logic belongs in viewWillAppear: (called before the transition animation starts, when the view has no parent yet) and viewDidAppear: (called after the animation, when the view is fully visible.) loadView is called once when your VC thinks the view will shortly be needed, and isn’t called again unless a low-memory condition dumps the view and it needs recreating.

    Override loadView when you want to completely replace nib loading with some other view tree construction method. I started out doing this, but rarely do so anymore.

    Override viewDidLoad when you still want the normal nib loading to happen, but also want to do some view tree construction/post-processing of your own. This is what I find myself doing 99% of the time.

    when some trigger calls for moving to, say, screen B, would a call be made to ‘transition out’ my views, then call forth some other view controller to ‘set up your views’ and transition them in?

    The transitioning happens for you, if you use any of the presentation methods listed earlier. All you need to do is implement viewWill/DidAppear and friends, to be informed when it happens.

    You may wish to investigate the “TheElements” sample project (search the xcode docs for “the elements”) As requested, it doesn’t use nibs; it sets up everything in code the hard way. It has good examples of using TabBarController and NavigationController, and splits responsibility among VCs in more or less the recommended way.

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

Sidebar

Related Questions

No related questions found

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.