[TIMOB-19492] iOS9: 3D-Touch: Support new UITouch properties + events
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-11-11T22:22:28.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.2.0 |
Components | iOS |
Labels | 3DTouch, iOS9 |
Reporter | Hans Knöchel |
Assignee | Angel Petkov |
Created | 2015-09-10T17:18:37.000+0000 |
Updated | 2015-11-24T16:48:50.000+0000 |
Description
Apple just presented the new 3D-Touch feature of the iPhone6S. There are new events available, as well as methods to check whether a device supports 3D-Touch capabilities.
*New properties (available in iOS9.0)*:
-
force
: 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). (read-only)
- maximumPossibleForce
: The value of this property is sufficiently high to provide a wide dynamic range for values of the force property.
- forceTouchCapability
: Shows whether or not 3D-Touch (aka forceTouch) is available. Possible constants: UIForceTouchCapabilityUnknown
, UIForceTouchCapabilityAvailable
and UIForceTouchCapabilityUnavailable
*Related documents*:
- https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UITouch_Class/
- https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UITraitCollection_ClassReference/#//apple_ref/occ/instp/UITraitCollection/forceTouchCapability
Attachments
File | Date | Size |
---|---|---|
Screen Shot 2015-09-15 at 19.54.37.png | 2015-09-16T02:58:09.000+0000 | 532550 |
[~ben.bahrenburg@gmail.com] You also suggested the new events, can you explain how you would like them to be integrated? And note, that they are iOS 9.1 only, as well as some of the new UITouch properties listed in the UITouch document. Thanks!
Fixed as part of TIMOB-19667!
Demo code (see related ticket): https://gist.github.com/hansemannn/7f4b24cc5394d9e6bf5f
Verified implemented, using: MacOS 10.11.2 (15C47a) Studio 4.4.0.201511182122 Ti SDK 5.1.1.v20151123142050 Appc NPM 4.2.2 Appc CLI 5.1.0 Ti CLI 5.0.5 Alloy 1.7.26 Arrow 1.3.22 Xcode 7.1.1 (7B1005) Node v0.12.7 Java 1.7.0_80 production The specified events/methods fire and behave as expected using the provided test case.