我有NSScrollView我通过CATransform3DMakeScale(1.0f,-1.0f,1.0f)进行转换,然后它开始向错误的方向滚动,现在我需要根据Y ax滚动到相反的方向
更新
通过继承NSScrollView找到解决方案:
- (void)scrollWheel:(NSEvent *)theEvent
{
int scrollingDeltaY = -[theEvent deltaY];
CGEventRef cgEvent = CGEventCreateCopy(theEvent.CGEvent);
CGEventSetIntegerValueField(cgEvent, kCGScrollWheelEventDeltaAxis1, scrollingDeltaY);
NSEvent *newEvent = [NSEvent eventWithCGEvent:cgEvent];
CFRelease(cgEvent);
[super scrollWheel:newEvent];
}