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 thro开发者_开发知识库ugh 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.
How about this:
- Place a transparent UIView on top of the UIScrollView
- Attach two UIImageView views to that UIView, with their alphas set to somewhere less than 1.
- 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.
精彩评论