Re: Cocoa alternative for method aliasing?
Re: Cocoa alternative for method aliasing?
- Subject: Re: Cocoa alternative for method aliasing?
- From: Lou Zell <email@hidden>
- Date: Tue, 29 Mar 2011 14:03:05 -0700
David, Matt,
Thanks for the responses and pointing me towards UIControlEvents.
> >-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
> >{
> > [[self nextResponder] touchesBegan:touches withEvent:event];
> >}
>
> Don't do that. The way to pass touches up the responder chain is by calling
> super. This will do exactly what you're after, I think.
>
>
Using super will call -touchesBegan:withEvent of UIButton. Which, in my
experiments, does not continue to pass the event up the responder chain --
i.e. I never see the touch events reach my UIViewController (where I want
them to end up). My understanding is that once an object is found that
responds to -touchesBegan:withEvent, the event propagation ends unless
explicitly forwarded. Calling super will get the event to my superclass
(UIButton), but not beyond that.
Lou
_______________________________________________
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