Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-12262

iOS: enable native Photos gallery-like zoomable image

    Details

      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.

        Attachments

          Activity

            People

            • Assignee:
              vduggal Vishal Duggal (Inactive)
              Reporter:
              dcassenti Davide Cassenti
            • Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration