質問

I'm trying to call an ibaction method when an NSButton is clicked down, but I can't figure out how to get do to that instead of having it called when clicked up.

役に立ちましたか?

解決

[yourButton sendActionOn:NSLeftMouseDownMask];

他のヒント

[btn setAction:@selector(Method:)];

[btn setTarget:objectThatRespondsToMethod];
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top