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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:48:31+00:00 2026-06-04T17:48:31+00:00

I have made an app and i want to make it multi touch compatible.

  • 0

I have made an app and i want to make it multi touch compatible. i have tried looking around but the answers aren’t specific to mine.
Here is what i do:

1) My coding:

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {

[self touchesMoved:touches withEvent:event];
if (gameState == kGameStatePaused) {(gameState = kGameStateRunning);}
}

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
if(gameState == kGameStateRunning) {

    UITouch *touch = [[event allTouches] anyObject];
    CGPoint location = [touch locationInView:touch.view];
    if(location.x > 400) {

        CGPoint yLocation = CGPointMake(playerPaddle.center.x, location.y);
        playerPaddle.center = yLocation;
    }

    if (gameStyle == kGameStyleTwoP) {
        if(location.x < 100) {

            CGPoint yLocation2 = CGPointMake(computerPaddle.center.x, location.y);
            computerPaddle.center = yLocation2;
        }
    }
}

2) I have gone onto Interface Builder and checked the box for multitouch enabled

3) I build and run my app and it opens properly and when i go to test the multitouch i hold “option key” and click and move the mouse

4) (i am trying to make computerPaddle and playerPaddle both move) but only one of the works at a time

I have to tried to fix it but i can’t understand where i am going wrong.

Any help is useful.
THX.

  • 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-04T17:48:33+00:00Added an answer on June 4, 2026 at 5:48 pm

    look this line

    UITouch *touch = [[event allTouches] anyObject];
    

    you only take one touch and ignore rest and thats why only one thing can move

    so replace with a for loop should fix the problem

    - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
    if(gameState == kGameStateRunning) {
    
        for (UITouch *touch in [event allTouches]) {
        CGPoint location = [touch locationInView:touch.view];
        if(location.x > 400) {
    
            CGPoint yLocation = CGPointMake(playerPaddle.center.x, location.y);
            playerPaddle.center = yLocation;
        }
    
        if (gameStyle == kGameStyleTwoP) {
            if(location.x < 100) {
    
                CGPoint yLocation2 = CGPointMake(computerPaddle.center.x, location.y);
                computerPaddle.center = yLocation2;
            }
        }
    }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a custom number pad keypad for my iOS app, but want
I have never made an app using XCode and Cocoa but I think following
I am new to .NET, I have made a small app. I want that
I have just made an app and now I'm planning to make a 'pro'
I have made an android app. I want to upload it on android market.
I have made an app that gets an array of addresses from a web
I have made an app that implements the iPhone's camera. When the user finishes
I have made an android app which working fine. I implemented the Login functionality
I have an App made with phonegap (Cordova 1.5). The audio is in wav
I have made my own sms app with a reciver. Now the emulator doesn'T

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.