gpt4 book ai didi

iphone - 只有核心动画的 FlipBoard

转载 作者:塔克拉玛干 更新时间:2023-11-02 10:19:30 27 4
gpt4 key购买 nike

我想通过仅使用 Core Animation 而不是 OpenGL 来制作多个 View (不是图像而是 uiview)的翻转板。我看到很多翻转的例子,但它们只涉及图像翻转和图像层的捕获。喜欢这里:https://github.com/brow/leaves有些人可以帮助我。

最佳答案

我找到了这个 Github project called FlipView .它包括您可能不需要的布局工具,但页面翻转是使用 AFKPageFlipper 中的核心动画层实现的。类(class)。

自己实现:

  1. 将 View 的图层内容复制到图像中。 ([layer renderInContext:])
  2. 将图像的右侧添加到新层的contents
  3. 添加旋转 CATransform3D 变换到具有透视的图层。参见 Listing 2 in the Core Animation Guide for adding perspective .

关于iphone - 只有核心动画的 FlipBoard,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4828265/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com