On 29/07/2011, at 3:24 PM, William Squires wrote:

> Okay, now what? How do I connect the "Touch Up Inside" of the UIImageView 
> (subclass instance) to the
> 
> -(IBAction)customButtonTouched:(id)sender;
> 
> method of my view controller (the one that created the UIImageView subclass 
> instances as subviews)
> 
> 2nd question: how can I get first crack at the "Touch Up Inside" event (in 
> the UIImageView subclass) before I pass it on to my view controller?


In both cases, override the method -touchesEnded:withEvent: and do what you 
want there. Alternatively, attach a UIGestureRecognizer and sets its delegate 
to the view - then that delegate method can do what it needs to do, including 
calling the controller to do its part. You might need to add an ivar (or 
property) for the controller if it's not next responder - I don't see that 
UIView has a reference automatically to its controller.

--Graham


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to