开发者

Preview content of UIScrollView

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:

  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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜