views:

124

answers:

2

I have a UIScrollView which displays a series of images (paging enabled). I would like to provide a way to preview the next and the last visible image in the scrollview.

For example, if I have three images (A, B, and C) and image B is currently visible, then, on the right of image B I would like to see image C through some sort of semi-transparent view and to the left of image B I would like to see image A through another semi-transparent view. When the current image animates into/out of view, then the images in the semi-transparent views also animate.

Any ideas?

Thanks.

A: 

How about this:

  1. Place a transparent UIView on top of the UIScrollView
  2. Attach two UIImageView views to that UIView, with their alphas set to somewhere less than 1.
  3. In your UIScrollView delegate's scrollViewWillBeginDragging and scrollViewDidEndDragging methods, handle the animation of the two UIImageViews.

If you don't care about the preview images animating (or want to do something simpler, like just cross fading them, then it's even simpler.

John Biesnecker
A: 

I think you are looking for something like what I've posted on my blog: http://blog.sallarp.com/iphone-ipad-appstore-like-uiscrollview-with-paging-and-preview/

The control mimics the look of the scroll view in AppStore that display the application images.

Merrimack