Issues using UITapGestureRecognizers in Interface Builder

Posted by 5StringRyan on Stack Overflow See other posts from Stack Overflow or by 5StringRyan
Published on 2011-12-12T22:10:39Z Indexed on 2012/07/03 3:16 UTC
Read the original article Hit count: 195

I'm attempting to use the UITapGestureRecognizer object that can be found in Interface Builder. I've dragged a single "UITapGestureRecognizer" from the object library to a single view xib. I then create an IBAction method from this tap gesture, for a simple test, I'm just printing an "NSLog" message to the console once there is a tap on the view. I've run this, and the tap method isn't being called. I right click the view in IB and I noticed that there is a warning "!" on the view's "Outlook Collections" I see:

Outlook Collections
gestureRecognizers - Tap Gesture Recognizer (!)

The warning states: UIView does not have an outlet collection named gestureRecognizers.

What do I need to do to remedy this?

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about ios