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

Ask A Question

Stats

  • Questions 220k
  • Answers 220k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You need to add an extra layer of macros to… May 12, 2026 at 11:58 pm
  • Editorial Team
    Editorial Team added an answer Don't use gtk_signal_connect_object(), it's deprecated and replaced by g_signal_connect_swapped(). You… May 12, 2026 at 11:58 pm
  • Editorial Team
    Editorial Team added an answer Sure. Just create a specific template which matches the Device… May 12, 2026 at 11:58 pm

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a French site that I want to parse, but am running into
I have text I am displaying in SIlverlight that is coming from a CMS
I want use html5's new tag to play a wav file (currently only supported

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.