• 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
Intercepting events and touches in UIPickerView subclasses? (or, WTF is going in the UIPickerView's responder chain?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Intercepting events and touches in UIPickerView subclasses? (or, WTF is going in the UIPickerView's responder chain?)


  • Subject: Intercepting events and touches in UIPickerView subclasses? (or, WTF is going in the UIPickerView's responder chain?)
  • From: Sam Krishna <email@hidden>
  • Date: Fri, 18 Dec 2009 07:00:55 -0500

Hi all,

So, I'm working on a client project where he wants to have ActionOne for flicks on the UIPickerView and ActionTwo for non-flick selections.

When I subclass UIPIckerView, I explicitly follow the pattern of overriding one of the standard methods for doing this kind of thing, and has worked *very well* in the past:

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

Unfortunately, this method *never fires* in the UIPickerView's responder chain (I suspect it has something to do with the highly-animated nature of UIPickerView). The only methods I can get to fire to give me anything about CGPoint information are:

- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event

what's interesting about these two methods is that they don't have any UITouch history with them. Sooo.... they are *mostly useless* also.

I've considered applying a UIView on top of the Picker View to intercept the touches and make gesture determinations, since that works very well. But before I go down that road, I thought I'd ask the community what your thoughts are about solving this problem. Again, all I need is for touchesEnded:withEvent: to fire in the responder chain to get what I need.

(BTW, the last time this question was asked directly, Google reported back crickets chirping. I hope the same thing doesn't happen this time - I know one of you is smart enough to have already solved this)

Namaste + Live Playfully,

Sam
-----
If he listens in faith,
finding no fault, a man is free
and will attain the cherished worlds
of those who act in virtue.

_______________________________________________

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: Intercepting events and touches in UIPickerView subclasses? (or, WTF is going in the UIPickerView's responder chain?)
      • From: glenn andreas <email@hidden>
  • Prev by Date: NSWindow delegate messages question
  • Next by Date: Re: NSWindow delegate messages question
  • Previous by thread: Re: NSWindow delegate messages question
  • Next by thread: Re: Intercepting events and touches in UIPickerView subclasses? (or, WTF is going in the UIPickerView's responder chain?)
  • Index(es):
    • Date
    • Thread