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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:53:43+00:00 2026-06-01T18:53:43+00:00

I can’t find anywhere in the documentation. When this message is called on my

  • 0

I can’t find anywhere in the documentation. When this message is called on my subclass of UIView:

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event

How can I get the touch for which this message was called ?

On both the NSSet and UIEvent I can get only sets of touches, but no unique identifier so I can determine which touch triggered the message.

PS: why on hell would they send a NSSet of all touches, and also the possibility to get the same set from [[event allTouches] anyObject]

  • 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-01T18:53:44+00:00Added an answer on June 1, 2026 at 6:53 pm

    You can’t get the touch, because sometimes multiple touches triggered the message. If the user has two fingers on the screen, and moves both, you can get a single touchesMoved:withEvent: in which both touches are updated.

    You need to process every touch in the touches set. If you’ve disabled multitouch for the view, so that you know there will only ever be one touch in the set, you can use touches.anyObject to get the touch. But if you haven’t disabled multitouch, you need to loop over all of the touches in the set.

    The message includes a set of touches separate from event.allTouches because the user might have three fingers down but only move one or two of them. The touches set only contains the moved touches, but event.allTouches contains all of the user’s touches, including the touches that have not moved since the last message.

    The unique identifier for the touch is the UITouch object itself. When the user puts a finger on the screen, iOS creates a UITouch object. It updates that object as the user moves his finger. So you can use the UITouch object as the key in an NSDictionary, or you can attach your own objects to it using objc_setAssociatedObject.

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

Sidebar

Related Questions

Can anyone help me trying to find out why this doesn't work. The brushes
can I make my own headers in HTTP request ? e.g. This is normal
Can this be done? It seems like this should be possible. In general, I
Can somebody help me with this. There is HTML code: <h3> <label> <input type=checkbox
Can I run this in a Windows command prompt like I can run it
Can anybody help me? What should be the datatype for this type -07:00:00 of
can someone explain why the compiler accepts only this code template<typename L, size_t offset,
Can't figure out how to do this in a pretty way : I have
Can anyone (maybe an XSL-fan?) help me find any advantages with handling presentation of
Can anyone tell me how I can display a status message like 12 seconds

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.