开发者

FlipBoard with core animation only

i would like to do a flipboard of many view (not image but uiview) by using only Core Animation, not OpenGL. i saw many exemple of flip but th开发者_运维问答ey involve only image flip and capture of image layer. like here: https://github.com/brow/leaves some can help me please.


I found this Github project called FlipView. It includes layout tools that you might not need, but the page flipping is implemented using Core Animation layers in the AFKPageFlipper class.

To implement it yourself:

  1. Copy the view's layer contents to an image. ([layer renderInContext:])
  2. Add the right side of the image to a new layer's contents.
  3. Add a rotation CATransform3D transform to the layer with perspective. See Listing 2 in the Core Animation Guide for adding perspective.
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜