This module provides a custom user experience in response to 3D Touch interactions.
- iOS 10 and later
- 3D-Touch supported devices
- View the Using Titanium Modules document for instructions on getting started with using this module in your application.
- Use
require
to access this module from JavaScript, theTiPreviewInteraction
variable is a reference to the Module object.:
var TiPreviewInteraction = require('ti.previewinteraction');
- iOS example applications are located in the
ios/example/
folder of the module
- If you want to provide the system default previewing behavior (peek and pop), use Ti.UI.iOS.PreviewContext.
- This feature requires iOS 10+ and a 3D-Touch capable device (such as iPhone 6S or iPhone 6S Plus).
You cannot test this on the iOS simulator. To check if the current device supports this feature,
use
previewInteractionSupported
.
Determines if the current device supports preview interactions.
Cancels the current preview interaction. When a preview interaction is in progress, use this method to cancel it, preventing any further callbacks.
The view to start the preview interation from.
Fired when the user peeks the preview.
progress
(Float): Provides progress of peek ranging between 0.0 and 1.0.ended
(Boolean): Value indicating progress has ended or not.touchPoint
(Ti.Point): Point at which source view was touched.
Fired when the user pops the preview.
progress
(Float): Provides progress of peek ranging between 0.0 and 1.0.ended
(Boolean): Value indicating progress has ended or not.touchPoint
(Ti.Point): Point at which source view was touched.
Fired when the preview interaction was cancelled by the user.
If you run into issues, please file a JIRA ticket or ask the TiSlack for help, thanks!
- Vijay Vikram Singh
- Hans Knöchel
Interested in contributing? Read the contributors/committer's guide.
This module is Copyright (c) 2010-present by Appcelerator, Inc. All Rights Reserved. Usage of this module is subject to the Terms of Service agreement with Appcelerator, Inc.