Вопрос

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