开发者

Perform different actions on button up and down

Ok. I've been digging around trying to find a way to capture button up and down actions. I'm not even sure what the proper terminology in Xcode for this would be. It's pretty easy in MS Visual, but I can't seem to find how to do this with Xcode.

开发者_开发百科

Essentially, I want to fire an action when the button is pressed down and held, and then another when the button is released.

I'm not really sure how to go about this. Any hints, or pointers in the right direction would be greatly appreciated!


You didn't specify, so I'm going to assume this is for the Mac and not iOS. You should read the NSResponder documentation. You can do exactly what you want with that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜