evgenyneu / Auk

An image slideshow for iOS written in Swift.
MIT License
278 stars 44 forks source link

Pinch to zoom, random auto-scroll #16

Open santanu4ver opened 8 years ago

santanu4ver commented 8 years ago
  1. Pinch-to-zoom
  2. Linear (already has) and Random auto-slideshow

Thanks!

evgenyneu commented 8 years ago

Hi, thank you for good suggestions. Here are some thoughts.

1. Pinch-to-zoom.

I think pinch-to-zoom can be tricky to implement properly such that it is easy to use. For me, as a user, it can be confusing if you can both scroll the slideshow and zoom. I saw such behaviour in other apps and personally never liked it. The problem is that when you zoom-in on an image in a slideshow you can then scroll the zoomed image to see its other edge. But then when you reach the edge of this particular image it means that you can now scroll to the next image in the slideshow. It is both hard to explain and to use because this behaviour includes horizontal scrolling of a zoomed image inside horizontal scrolling of the slideshow. In other words, it contains scrolling inside scrolling in horizontal direction.

I personally prefer the scroll view and pinch-to-zoom to be separated into different screens. It was traditionally done this way since first ecommerce web sites. For example, on a product details page you have a slideshow with product images. You can tap an individual image and it will open another screen showing only this single image in higher resolution where you can zoom it in. I think this approach is easier to implement, easier to use and familiar to people. The zooming of a single image can be done using this approach with Auto Layout.

Having said that I do admit that there may be other use cases for this feature to exist. But I think adding it to this library will make it a bit too complex, prone to bugs and hard to maintain.

2. Random auto-slideshow.

If anyone needs this feature feel free to submit a pull request. The method can be called something like scrollView.auk.startAutoScrollRandom(delaySeconds: 3). One thing to keep in mind is that if it scrolls from the second page to the 9th path, it will briefly show 7 pages in-between during the transition. Same way it does from the last page to the first page currently.

Thanks for your feedback, @santanu4ver.