Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图在单击 NSButton 时调用 ibaction 方法,但我不知道如何做到这一点,而不是在单击时调用它。
[yourButton sendActionOn:NSLeftMouseDownMask];
[btn setAction:@selector(Method:)]; [btn setTarget:objectThatRespondsToMethod];