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

  • SEARCH
  • Home
  • 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 8198845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:02:39+00:00 2026-06-07T06:02:39+00:00

I want to create a two player game on iPad, but I don’t really

  • 0

I want to create a two player game on iPad, but I don’t really know how should I do it right. My concept will be just like “fruit ninja” of two player game (one vs other).

I mean that one player will play in viewcontrollerA and the other one will play in viewcontrollerB (that should be upside down from the viewcontrollerA).

How should I do it? Do I need to create two view controllers and display then via controller containment, or there is another and better way to do that?
thanks!

  • 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-06-07T06:02:42+00:00Added an answer on June 7, 2026 at 6:02 am

    In iOS5 there is a blessed way for controllers to receive orientation events, add/remove callbacks, and they are properly inserted into the responder chain. So if you are going to do it, this is the best way. As long as you don’t do silly things like adding the same view to two UIViewControllers you are fine.

    Why do it? I see logical to put the game engine on the master controller, write a client, encapsulate that client on a child view controller, and reuse it for the two players.

    You could also use nested controllers to encapsulate complexity if you feel you need such thing. Example: one for the interface talking to the game engine, and another for the screen getting events from the engine.

    UIViewController containment is easy. You need to read 6 methods and understand what calls what. You are welcome to read the documentation, but in a nutshell:

    • addChildViewController: Adds a child view controller. You also need to manually add the view of the child: [self.view addSubView:chieldVC.view];.
    • removeFromParentViewController Removes a child view controller.
    • transitionFromViewController... Replace a view or move a view to the front.
    • willMoveToParentViewController: Automatically called by addChildViewController:. Call it only if you are going to remove (pass nil to indicate the controller becomes orphan). Override it only if you need custom code to happen.
    • didMoveToParentViewController: You must call this after addChildViewController when the animation completes (or if there is no animation call it right away).
    • automaticallyForward.... Override and return NO only if you manually want to forward rotation and appearance calls.

    For example, to nest one controller in another, add the child’s view as a regular view, and call addChildViewController: and didMoveToParentViewController: in the order shown below:

    // from the parent view controller
    ChildViewController *child = [ChildViewController new];
    [self addChildViewController:child];
    [self.view addSubview:child.view];
    [child didMoveToParentViewController:self];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create an array which has two columns. The output should contain
I want to create two widgets in flex. One for the movies ( that
I want to create two and three dimensional vectors using a constructor in a
i am preparing my android apps in which i want to create two row
I want to create a two level ExpandableListView from a local database. The group
I want to create a two-dimensional array in which I want to store records
If I want to do bi-directional mapping, do I need to create two mapping?
I want to create a view that contains two forms with their submit buttons.
I want to create a view from the following two tables: Entry: entry_id entry_date
I want to create my own component which consists two other panels. One of

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.