================
Titanium native module wrapper for TouchImageView: https://github.com/MikeOrtiz/TouchImageView
Do you like pinching and zooming on iOS? Wish it just worked on Android too? Here you go!
Download the latest distribution ZIP-file and consult the Titanium Documentation on how install it, or simply use the gitTio CLI:
$ gittio install org.iotashan.TiTouchImageView
Simply add the following lines to your tiapp.xml
file:
To use your module in code, you will need to require it.
var TiTouchImageView = require('org.iotashan.TiTouchImageView');
var myView = TiTouchImageView.createView();
###image
Accepts a string path to a local file, or a TiBlob image object.
###maxZoom
Maximum zoom value, as a decimal. "5.5" means you can zoom in 550%
###minZoom
Minimum zoom value, as a decimal. "0.5" means you can zoom out to 50%
###zoom
Zoom value for the view, as a decimal. Want to zoom to 300%? Set the value to 3.
###createView(props)
Accepts a dictonary of properties. TiTouchImageView extends TiUIView, so you can set other properties like top/left, backgroundColor, etc. Returns the view.
Resets the zoom to the default value for the view.
Scrolls the view to the point specified.