NSTouchMBS class New in 23.5
|class||Cocoa||MBS MacBase Plugin||23.5||✅ Yes||❌ No||❌ No||✅ Yes||Desktop & iOS|
You access touch objects through UIEvent objects passed into responder objects for event handling. A touch object includes accessors for:
- The view or window in which the touch occurred
- The location of the touch within the view or window
- The approximate radius of the touch
- The force of the touch (on devices that support 3D Touch or Apple Pencil)
A touch object also contains a timestamp indicating when the touch occurred, an integer representing the number of times the user tapped the screen, and the phase of the touch in the form of a constant that describes whether the touch began, moved, or ended, or whether the system canceled the touch.
To learn how to work with swipes, read Handling Swipe and Drag Gestures in Event Handling Guide for UIKit Apps.
A touch object persists throughout a multi-touch sequence. You may store a reference to a touch while handling a multi-touch sequence, as long as you release that reference when the sequence ends. If you need to store information about a touch outside of a multi-touch sequence, copy that information from the touch.
Using NSTouch on macOS and UITouch on iOS.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.
- 11 properties
- property force as Double
- property Handle as Integer
- property majorRadius as Double
- property majorRadiusTolerance as Double
- property maximumPossibleForce as Double
- property phase as Integer
- property tapCount as Integer
- property timestamp as Double
- property type as Integer
- property view as NSViewMBS
- property window as NSWindowMBS
- 3 methods
- 5 constants
A touch resulting from direct contact with the screen.
A touch that doesn’t result from contact with the screen.
Indirect touches are generated by touch input devices that are separate from the screen. For example, the trackpad of an Apple TV remote generates indirect touches.
A touch resulting from a button-based, indirect input device that describes the input sequence from button press to button release.
A touch from Apple Pencil.
A pencil touch occurs when Apple Pencil interacts with the device’s screen.
A touch from a stylus.
This class has no sub classes.
Some methods using this class:
- NSEventMBS.allTouches as NSTouchMBS()
- NSEventMBS.touchesForView(view as NSViewMBS) as NSTouchMBS()
- NSEventMBS.touchesForWindow(win as NSWindowMBS) as NSTouchMBS()
Some events using this class:
- MapKitIOSControlMBS.touchesBegan(e as NSEventMBS, touches() as NSTouchMBS) as boolean
- MapKitIOSControlMBS.touchesCancelled(e as NSEventMBS, touches() as NSTouchMBS) as boolean
- MapKitIOSControlMBS.touchesEnded(e as NSEventMBS, touches() as NSTouchMBS) as boolean
- MapKitIOSControlMBS.touchesMoved(e as NSEventMBS, touches() as NSTouchMBS) as boolean
- SCNIOSControlMBS.touchesBegan(e as NSEventMBS, touches() as NSTouchMBS) as boolean
- SCNIOSControlMBS.touchesCancelled(e as NSEventMBS, touches() as NSTouchMBS) as boolean
- SCNIOSControlMBS.touchesEnded(e as NSEventMBS, touches() as NSTouchMBS) as boolean
- SCNIOSControlMBS.touchesMoved(e as NSEventMBS, touches() as NSTouchMBS) as boolean
- MonkeyBread Software Releases the MBS Xojo Plugins in version 23.5
- MBS Xojo Plugins, version 23.5pr7
- Version 23.5
- Added NSTouchMBS class for macOS and iOS (using UITouch on iOS).
The items on this page are in the following plugins: MBS MacBase Plugin.