Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSTouchMBS class.

NSTouchMBS.deviceSize as NSSizeMBS   New in 24.1

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 24.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The range of the touch device in points, such as 72 ppi.

The lower-left corner of the surface is considered (0,0).
(Read only property)

NSTouchMBS.force as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 23.5 ❌ No ❌ No ❌ No ✅ Yes iOS only
The force of the touch, where a value of 1.0 represents the force of an average touch (predetermined by the system, not user-specific).

This property is available on devices that support 3D Touch or Apple Pencil. To check at runtime if a device supports 3D Touch, read the value of the forceTouchCapability property on the trait collection for any object in your app with a trait environment.
The force reported by Apple Pencil is measured along the axis of the pencil. If you want a force perpendicular to the device, you need to calculate this value using the altitudeAngle value.
The force reported by Apple Pencil is estimated at first, and may not always be updated. To determine if an update is expected, consult estimatedPropertiesExpectingUpdates and look for a UITouchPropertyForce flag. In this scenario, estimationUpdateIndex contains a non-nil value, which you can correlate with the original touch when the update occurs. When there are no expected force updates, the entire touch sequence usually won't have updates, so it may be appropriate to apply a custom, tool-specific force curve to the touch sequence.
(Read only property)

NSTouchMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 23.5 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The internal object reference.

(Read and Write property)

NSTouchMBS.identity as MemoryBlock   New in 24.1

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 24.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The changes to a particular touch during its lifetime.

While touch identities may be re-used, they are unique during the life of the touch, even when multiple devices are present.

As of current macOS releases, this value is a 16 byte value, which MBS Plugin provides back as MemoryBlock.
(Read only property)

NSTouchMBS.majorRadius as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 23.5 ❌ No ❌ No ❌ No ✅ Yes iOS only
The radius (in points) of the touch.

Use the value in this property to determine the size of the touch that was reported by the hardware. This value is an approximation of the size and can vary by the amount specified in the majorRadiusTolerance property.
(Read only property)

NSTouchMBS.majorRadiusTolerance as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 23.5 ❌ No ❌ No ❌ No ✅ Yes iOS only
The tolerance (in points) of the touch’s radius.

This value determines the accuracy of the value in the majorRadius property. Add this value to the radius to get the maximum touch radius. Subtract the value to get the minimum touch radius.
(Read only property)

NSTouchMBS.maximumPossibleForce as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 23.5 ❌ No ❌ No ❌ No ✅ Yes iOS only
The maximum possible force for a touch.

The value of this property is sufficiently high to provide a wide dynamic range for values of the force property.
This property is available on devices that support 3D Touch or Apple Pencil. To check at runtime if a device supports 3D Touch, read the value of the forceTouchCapability property on the trait collection for any object in your app with a trait environment.
(Read only property)

NSTouchMBS.normalizedPosition as NSPointMBS   New in 24.1

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 24.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The normalized position of the touch.

The normalized position is a scaled value between (0.0) and (1.0,1.0), where (0.0,0.0) is the lower-left position on the touch device.
(Read only property)

NSTouchMBS.phase as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 23.5 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The phase of the touch.

The property value is a constant that indicates whether the touch began, moved, ended, or was canceled. For descriptions of the possible values of this property, see UITouchPhase.
(Read only property)

NSTouchMBS.resting as Boolean   New in 24.1

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 24.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The indicator for a resting touch.

Resting touches occur when a user simply rests their thumb on the trackpad device.
(Read only property)

NSTouchMBS.tapCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 23.5 ❌ No ❌ No ❌ No ✅ Yes iOS only
The number of times the finger was tapped for this given touch.

The value of this property is an integer containing the number of taps that occurred for this touch within a predefined period of time. Use this property to evaluate whether the user single-tapped, double-tapped, or even triple-tapped a particular view or window.
(Read only property)

NSTouchMBS.timestamp as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 23.5 ❌ No ❌ No ❌ No ✅ Yes iOS only
The time when the touch occurred or when it was last mutated.

The value of this property is the time, in seconds since system startup, that the touch originated or was last changed. You can store the value of this property and compare it to the timestamp in subsequent UITouch objects to determine the duration of the touch and, if it is being swiped, the speed of movement. For a definition of the time since system startup, see the description of the systemUptime method of the NSProcessInfo class.
(Read only property)

NSTouchMBS.type as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 23.5 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The type of the touch.

Type constants on macOS and iOS are different. Please check Apple's documentation.
(Read only property)

NSTouchMBS.view as NSViewMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 23.5 ❌ No ❌ No ❌ No ✅ Yes iOS only
The view to which touches are being delivered, if any.

The value of this property is the view object to which touches are being delivered, which is not necessarily the view the touch is currently in. For example, when a gesture recognizer recognizes the touch, this property is nil because no view is receiving the touch.
(Read only property)

NSTouchMBS.window as NSWindowMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 23.5 ❌ No ❌ No ❌ No ✅ Yes iOS only
The window in which the touch initially occurred.

The value of the property is the window in which the touch originally occurred. This window might not be the same window that currently contains the touch.
(Read only property)

The items on this page are in the following plugins: MBS MacBase Plugin.


The biggest plugin in space...