Types of Gesture Events and Gesture Sequences If the view does not handle a gesture, it travels up the responder chain until another object handles it or until it is discarded. An NSWindow object delivers a gesture event to the view by calling the appropriate NSResponder method for the gesture: magnifyWithEvent:, rotateWithEvent:, or swipeWithEvent. They go along the same path as mouse events for delivery to the view under the mouse pointer. The system delivers low-level events representing specific gestures to the active application, where they’re packaged as NSEvent objects and placed in the application’s event queue. Two fingers moving vertically or horizontally is a scroll gesture. Three fingers brushing across the trackpad surface in a common direction is a swipe gesture. Two fingers moving in opposite semicircles is a gesture meaning rotate. Pinching movements (in or out) are gestures meaning zoom out or zoom in (also called magnification). The trackpad driver interprets some of these movements as specific gestures: Gestures are particular movements of fingers on a touch-sensitive surface, such as a trackpad’s, that have a conventional significance. Gestures are Touch Movements Interpreted By the Trackpad To understand these approaches it’s useful to know how and when the events are generated, how they are delivered to your application, and what kind of information they contain about the actual touches on the trackpad. Gestures and touch events require you to adopt a different approach for handling them. In other words, gestures are a series of multitouch events recognized by the trackpad as constituting a gesture. Gesture events are a species of multitouch events because they’re based on an interpretation of a sequence of touches. Touch-event features should supplement the conventional way of conveying user commands. You can also create applications that receive and respond to gestures and multitouch events in distinctive ways.Īn application should not rely on gesture-event or touch-event handling as the sole mechanism for interpreting user actions for any critical feature, because users might not be using a trackpad. In addition, the operating system provides default handling of gestures you can observe how OS X handles these gestures in the Trackpad system preference. The trackpad hardware includes built-in support for interpreting common gestures and for mapping movements of a finger to mouse events. When users touch and move their fingers on the trackpads of the MacBook Air and more recent models of the MacBook Pro, OS X generates multitouch events, gesture events, and mouse events.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |