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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:06:52+00:00 2026-06-08T05:06:52+00:00

The question is simple but extremely complicated: in UIResponder there are 4 methods for

  • 0

The question is simple but extremely complicated: in UIResponder there are 4 methods for handling touches.

- touchesEnded:withEvent:event
– touchesBegan:withEvent:
– touchesMoved:withEvent:
– touchesCancelled:withEvent:

How do I detect if a touch stopped on the screen?

The problem is that I have to detect if something moved under a stationary touch (not cancelled or ended. It just doesn’t move) And because it doesn’t move, none of these methods gets called.

My idea was this:

I could add the touches to a NSMutableArray but then I’d have to update it for any touch move (and that’s a lot). Also this creates more problems, I need to detect which of the touches stopped and if any ended. And because I get an NSSet from UIResponder, I don’t have an organized array so… all kinds of problems.

I’m waiting for ideas.

  • 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-08T05:06:54+00:00Added an answer on June 8, 2026 at 5:06 am

    i fixed it..and also found out something really cool about UITouch

    what i did: in

     – touchesBegan:withEvent:
    for(UITouch*touch in touches){
    [touchesSet addObject:touch]; } //touchesSet is a set that i store all the touches on the screen
    

    in

    - touchesEnded:withEvent:
    
    for(UITouch*touch in touches){
    [touchesSet removeObject:touch]; }
    

    in

    – touchesCancelled:withEvent:
    [touchesSet removeAllObjects];
    

    doing this i have a NSSet of all the touches on the screen at any given time, with position and UITouchPhase

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

Sidebar

Related Questions

Note: I'm sorry if this is an extremely simple question but I'm somewhat obsessive
I know this is an extremely simple question... but I do not know the
Apologies if this is simple question, but Im extremely worn down and though thinking
The question look simple but i can't find any information on Firebreath's wiki page
Simple question but I got a headache to solve this game. Example regex. [a-zA-Z0-9\s]
Simple question but i need it :) $query = SELECT * FROM `set` WHERE
Simple question but cannot find answer anywhere. When using a MS Chart Control of
A really simple question but I could not figure it out... I tried to
My question is too simple but puzziling. i have a develop a mvc pages
I have a simple question but was not able to find an answer on

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.