How can one detect two finger zoom gestures on MacBook trackpad? (within a selected NSView)
There's an event type (NSEventTypeMagnify
) for pinch gestures, as well as a NSResponder
method (-magnifyWithEvent:
) for handling such events. Cocoa differs a bit from Cocoa Touch in this respect; on the desktop, you generally let the OS interpret the gestures for you, and you respond to the meaning of the gesture rather than trying to identify the gesture itself.