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

The Archive Base Latest Questions

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

I’ve been reading three books (iPhone Game Development, iPhone cookbook and beginning iPhone development),

  • 0

I’ve been reading three books (iPhone Game Development, iPhone cookbook and beginning iPhone development), but so far I’ve not found the answer to my question, so I was hoping someone here could help me.

As an example, lets say that I want to have a joystick onscreen, and three buttons.

I need all of these permanently visible on the bottom of the screen and not taking up any of the game rendering area i.e. not overlayed onto the game.

Ok?

Now, from what I can gather, one way to do this, if I’ve understood this correctly, is to break those FOUR controls, and put each one on it’s OWN VIEW (OR SUB-VIEW), and have transparency where the other controls are on each layer…

So layer 1, will have the joystick and the background around the joystick, but a transparent section to the right of it…

the layer underneath that will be transparent where the (above layer) joystick is, and then have the bitmap for the button, and then transparent again to the right of that button… etc etc for each further layer / button.

That way I have a hierarchy for touch testing, if it’s on a transparent area, send to the next sub-view.

However, by the time I’ve got the game rendering and the scores etc… I’m looking at about 7 views…

So my questions are these:

  1. Is this the best (optimal) way to do this? If not, then how?

  2. Is there a performance or SDK limit on View’s with subviews or just multiple layers of views?

  3. Can all this be done on one layer / view =- bearing in mind that the joytick will move in all directions at the SAME TIME as one or MORE of the buttons can be pressed. therefore a false ‘pinch’ gesture could be detected by a button on the right of the screen being pressed at the same time the joystick is moved away from that finger press… see?

Please help, if you can.

If I’ve over complicated this, or got confused, please forgive me – I find it VERY difficult to ‘teach’ myself stuff… and if my explanations are confusing, please let me know and I’ll try and rewrite them.

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-05-12T05:16:07+00:00Added an answer on May 12, 2026 at 5:16 am

    If I understand, you are asking the UIKit to do the compositing of your bitmaps in 7 overlapping views instead of compositing it yourself into 1 image in a view. You also get the “benefit” of passing clicks through a chain of command.

    I would do it with one view – draw the bitmaps into one image each time there is a change – or even draw the joystick/button control bitmaps on top of the main graphics area. (You may also want to make the control size adjustable, and scale the images.)

    Testing each click against the non-transparent area of each layer doesn’t seem any simpler than testing the click against the known rectangles of all controls in a single image. I would think this code would be clearer in the end – fewer objects.

    As for “pinch”, the beginning point of the touch should determine which control is touched, and the touchesMoved data determines where it goes to. Don’t use the touchesMoved data to initiate a new button press.

    That said, I do everything in OpenGL so I’m used to managing my own layers.

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
I want to count how many characters a certain string has in PHP, but
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I'm looking for suggestions for debugging... If you view this site in Firefox or
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.