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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:36:07+00:00 2026-05-31T05:36:07+00:00

I am making a multiplayer game. My First screen , should show a login

  • 0

I am making a multiplayer game. My First screen , should show a login form (not modally). When it finishes, it should call a delegate to my “root class” and the “root class” should remove this view controller and add another.Then when the game ends the “root class” will be called with another delegate method and it should show another screen etc..

I have 3 ideas about it and I would like to know which is going to work better.

a) My root class is a uiviewcontroller and it adds/removes subviews when the delegate methods are called.

b) My root class is NSObject subclass and it changes the window rootViewControoler when it has to.

c) Navigation controller without navigation bar. But how i manage view hiearchy?

What is better logic to manage my view hieararchy? Any other idea than a and b?

  • 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-31T05:36:08+00:00Added an answer on May 31, 2026 at 5:36 am

    Of the options you present, I like c) the best.

    Option a) falls short because it ignores the primary rôle of view controllers – to manage full-page views of content. Using addSubview in situations like yours requires you to jump through a bunch of hurdles in order to manage the memory of all those objects in the view hierarchy, and you would just wind up reinventing the UIViewController wheel.

    Option b) is ok, but somehow it never seems to satisfy me. Just swapping the root in and out willy-nilly seems risky – this is what UIViewController is made to do, and it will probably do it better than you or I could. At any rate, you lose any benefits of animation if you do this. Which brings us to…

    Option c). UINavigationController is programmed to do the work required of your particular situation. You can manage the hierarchy using UINavigationController‘s - (void)setViewControllers:(NSArray *)viewControllers animated:(BOOL)animated. You could do a normal push, but this will keep the previous VC in memory while your main game VC sits in front and demands resources from the system. In short, I think your c) is easy and effective.

    As as post script here, be aware that there are alternatives other than your a,b,c. You might get by with using a UIPageViewController, though I’m not recommending it. iOS 5 introduced UIStoryboard as a method to manage your app’s UI, and UIStoryboardSegue to manage transitions. Check out the docs, if you’re targeting iOS 5, they might help you as well. But it sounds like a simple nav controller will work for you.

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

Sidebar

Related Questions

I'm making a multiplayer flash game that has a lot of graphics/code. I'm having
I am making a simple multiplayer economic game in pygame. It consists of turns
I'm making a multiplayer flash game in Actionscript 3.0, using Flash CS4 IDE. I'm
I am making a simple PHP and JavaScript multiplayer game. Here is a quick
I'm making a multiplayer mode for my game and I decided to use UDP.
I'm new to twisted and programming, I'm making a multiplayer game, and what i
I'm making a web browser based multiplayer game. I've determined that websockets are the
I'm making a multiplayer game in XNA 4.0, using the .NET socket classes. Since
I'm in the process of making a browser based multiplayer turnbased strategy game similiar
Making a 2D OpenGL game. When rendering a frame I need to first draw

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.