Skip to content

UIView.animate是在View层的动画吗?它和CoreAnimation这个Layer层的相比是不是效率会低呢? #3

Open

Description

@XuanZheJiang

看了老师的视频很受启发。期待老师的后续大作。今日提问望解答,虽说是个基础问题。谢谢!

Activity

  1. JakeLin commented on Oct 20, 2016

    @JakeLin
    Owner

    谢谢你的支持。UIView 的动画底层还是使用了 Core Animation 的 APIs,执行效率会低一点,但是 UIView 动画的 API
    更加简便,所以我推荐可以使用 UIView 动画的先使用它,如何不行再使用 Core Animation 的动画。 请看一下 iOS 10 最新的
    API https://developer.apple.com/reference/uikit/uiviewpropertyanimator
    我也做了个简单的例子叫做 SaveTheDot https://github.com/JakeLin/SaveTheDot.

    在 render 方面, UIView 确实比 CALayer 要慢,因为他包括 CALayer,而且要处理事件。有些库未来加快 render, 把
    UI 元素在 background 线程合并处理成 layer,然后再 render,这样比在直接使用多层的 UIView 要快。

    谢谢
    Jake

    On 20 October 2016 at 12:34, 蒋轩哲 notifications@github.com wrote:

    看来老师的视频很受启发。期待老师的后续大作。今日提问望解答,虽说是个基础问题。谢谢!

    —
    You are receiving this because you are subscribed to this thread.
    Reply to this email directly, view it on GitHub
    #3, or mute the
    thread
    https://github.com/notifications/unsubscribe-auth/AAjBoK6yj98aClixgrV78m_4bcLruOZkks5q1sU2gaJpZM4Kboc5
    .

  2. XuanZheJiang commented on Oct 20, 2016

    @XuanZheJiang
    Author

    多谢老师指点!在做Login页面那集提到将很多View放在了屏幕左边。但是我的DEMO在push出Login页面的瞬间,可以清楚的看到放在屏幕左边的控件。这个是正常而不可避免的吗?多谢老师!

  3. JakeLin commented on Oct 20, 2016

    @JakeLin
    Owner

    不好意思,这个细节我记不清楚了,你可以截个图看看吗?而且当时为了简化,没有讲述 Auto Layout 等内容,在 github 的 project 都做上了。

    2016-10-20 16:45 GMT+11:00 蒋轩哲 notifications@github.com:

    多谢老师指点!在做Login页面那集提到将很多View放在了屏幕左边。但是我的DEMO在push出Login页面的瞬间,
    可以清楚的看到放在屏幕左边的控件。这个是正常而不可避免的吗?多谢老师!

    —
    You are receiving this because you commented.
    Reply to this email directly, view it on GitHub
    #3 (comment),
    or mute the thread
    https://github.com/notifications/unsubscribe-auth/AAjBoI1nScNkHb9mTuSqkaTjKtrkKqc9ks5q1v_egaJpZM4Kboc5
    .

  4. XuanZheJiang commented on Oct 20, 2016

    @XuanZheJiang
    Author

    给您发了一封gmail邮件。包含了问题重现的视频。请您接收。谢谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions