Details
-
Type:
New Feature
-
Status: Closed
-
Priority:
High
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: Release 3.1.0, 2013 Sprint 04 API, 2013 Sprint 04
-
Component/s: iOS
-
Labels:
-
Environment:
iOS 6
SDK 3.0.0
Description
Problem description
ImageView should support a Photos gallery-like pan and zoom; this means, the image should be centered at first, then should bounce back on all sides when is bigger than the screen.
For more information, we are currently using the following code:
var win1 = Titanium.UI.createWindow({
|
backgroundColor:'#fff'
|
});
|
|
var scrollView = Ti.UI.createScrollView({
|
maxZoomScale: 4.0,
|
minZoomScale: 1.0,
|
zoomScale: 1.0,
|
});
|
|
var wrapper = Ti.UI.createView({
|
width:'100%',
|
height:'100%',
|
backgroundColor:'pink'
|
})
|
var imageView = Ti.UI.createImageView({
|
image: 'http://www.naturewalls.org/wp-content/uploads/2010/06/mirror_lake_in_the_mountains_wallpaper.jpg'
|
});
|
|
wrapper.add(imageView);
|
scrollView.add(wrapper);
|
win1.add(scrollView);
|
|
win1.open();
|
This works fairly well, but when zooming in, the "borders" on top and bottom (or left-right if the image is portrait) will not disappear, but will be zoomed as well. Need something that behaves as the native gallery pan and zoom.