• 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
Re: UIGestureRecognizer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UIGestureRecognizer


  • Subject: Re: UIGestureRecognizer
  • From: Conrad Shultz <email@hidden>
  • Date: Tue, 08 Nov 2011 14:34:16 -0800

On 11/8/11 10:23 AM, Eric E. Dolecki wrote:
> Hi all,
>
> I'd like to be able to drag my finger around on a UIImageView, and without
> lifting the finger have a long press trigger a method of mine. I'd prefer
> to use UIGestureRecognizer if possible.
>
>
> Right now the longPress triggers only on a distinct press, not a drag
> around and then hold.

As far as I know this behavior cannot be accomplished using only the
built-in recognizers.  It's easy to require a recognizer to fail before
another succeeds, but the inverse is not true.

Unless someone has a better suggestion, you will need to create a custom
UIGestureRecognizer subclass.  By careful design, you can probably use
UIPanGestureRecognizer and UILongPressGestureRecognizer internally to
minimize the amount of touch-handling code you need to write.

--
Conrad Shultz

Synthetiq Solutions
www.synthetiqsolutions.com
_______________________________________________

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

References: 
 >UIGestureRecognizer (From: "Eric E. Dolecki" <email@hidden>)

  • Prev by Date: Re: UITapGestureRecognizer and state/action w/rt numberOfTapsRequired
  • Next by Date: Re: ObjC's flat and all-exported namespace, help!
  • Previous by thread: UIGestureRecognizer
  • Next by thread: Changing the appearance of buttons
  • Index(es):
    • Date
    • Thread