How can I hook up an IBAction method to a plain view for a touch up event?

Posted by Thanks on Stack Overflow See other posts from Stack Overflow or by Thanks
Published on 2009-05-26T11:49:33Z Indexed on 2010/06/06 2:02 UTC
Read the original article Hit count: 313

Filed under:
|

I have created a blank new view-based application project in Xcode. It generated a myProjectViewController and an nib for it. In that nib for that view controller, there is just one view. I wanted to test some event handling stuff and created an -(IBAction) method that will just log a "hello world" when I touch the view. But for some reason, IB doesn't give me a chance to hook up the action. What am I doing wrong there? I also tried to put a UIView as subview there. When I drag from that to File's Owner (whoose class is the myProjectViewController, where I have the IBAction in the header), doesn't even mention the IBAction. But it actually should, right?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about interface-builder