我找到了这个,但是如何传递NSEvent
对象并调用此函数?
- (void)scrollWheel:(NSEvent *)theEvent
{
if(([theEvent momentumPhase] != NSEventPhaseNone) || [theEvent phase] != NSEventPhaseNone))
{
//theEvent is from trackpad
}
else
{
//theEvent is from mouse
}
}