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:
<modules>
<module platform="android">org.iotashan.titouchimageview</module>
</modules>
To use your module in code, you will need to require it.
var TiTouchImageView = require('org.iotashan.TiTouchImageView');
var myView = TiTouchImageView.createView();
Accepts a string path to a local file, or a TiBlob image object.
Maximum zoom value, as a decimal. "5.5" means you can zoom in 550%
Minimum zoom value, as a decimal. "0.5" means you can zoom out to 50%
Zoom value for the view, as a decimal. Want to zoom to 300%? Set the value to 3.
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.
Returns the current zoom level as a float.
Returns the current scroll position as point co-ordinates (x, y)