문제

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