Giter Site home page Giter Site logo

ti.previewinteraction's Introduction

Ti.PreviewInteraction

This module provides a custom user experience in response to 3D Touch interactions.

UIPreviewInteraction Resources

Requirements

  • iOS 10 and later
  • 3D-Touch supported devices

Getting Started

  • View the Using Titanium Modules document for instructions on getting started with using this module in your application.

Accessing the Module

  • Use require to access this module from JavaScript, the TiPreviewInteraction 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

Notes

  • 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.

API's

Top Level

Properties

previewInteractionSupported -> Boolean

Determines if the current device supports preview interactions.

PreviewInteraction

Methods

cancelInteraction

Cancels the current preview interaction. When a preview interaction is in progress, use this method to cancel it, preventing any further callbacks.

Properties

sourceView (Ti.UI.View)

The view to start the preview interation from.

Events

peek

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.
pop

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.
cancel

Fired when the preview interaction was cancelled by the user.

Report Issues

If you run into issues, please file a JIRA ticket or ask the TiSlack for help, thanks!

Contributors

  • Vijay Vikram Singh
  • Hans Knöchel

Interested in contributing? Read the contributors/committer's guide.

Legal

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.

ti.previewinteraction's People

Contributors

caspahouzer avatar cb1kenobi avatar hansemannn avatar jawa9000 avatar vijaysingh-axway avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.