• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
iOS: Differentiating between 1 or 2 finger touches
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iOS: Differentiating between 1 or 2 finger touches


  • Subject: iOS: Differentiating between 1 or 2 finger touches
  • From: Nathan Sims <email@hidden>
  • Date: Tue, 12 Jul 2011 16:30:59 -0700

I have a, iOS 4.3.3 UIView that is touch-enabled. When my -touchesBegan:withEvent: method gets called, I can't figure out how to differentiate when the user touched the screen with one finger or with two. Either way, I receive this:

<UITouchesEvent: 0x1796e0> timestamp: 423888 touches: {(
    <UITouch: 0x1d2ab0> phase: Began tap count: 1 window: <UIWindow: 0x197ac0; frame = (0 0; 768 1024); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x197c40>> view: <UIView: 0x1a1330; frame = (20 0; 748 1024); transform = [0, -1, 1, 0, 0, 0]; autoresize = W+H; layer = <CALayer: 0x1a13c0>> location in window: {572, 338} previous location in window: {572, 338} location in view: {686, 552} previous location in view: {686, 552}
)}

It tells me the 'tap count' but nowhere does it indicate if the user applied two fingers or just one. Instead of double-tapping or some other gesture, I need to make two fingers to mean 'quit the ongoing activity' to my program, whereas one finger means 'change value according to where the finger touched'.

Am I looking in the wrong place for this touch information?

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: iOS: Differentiating between 1 or 2 finger touches
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: Re: programmatically sorting an NSTableView
  • Next by Date: Re: iOS: Differentiating between 1 or 2 finger touches
  • Previous by thread: Re: programmatically sorting an NSTableView
  • Next by thread: Re: iOS: Differentiating between 1 or 2 finger touches
  • Index(es):
    • Date
    • Thread