Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
XuanZheJiang opened this issue Oct 20, 2016 · 4 comments

Comments

@XuanZheJiang
Copy link

XuanZheJiang commented Oct 20, 2016

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

@JakeLin
Copy link
Owner

JakeLin commented Oct 20, 2016

谢谢你的支持。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, 蒋轩哲 [email protected] 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
.

@XuanZheJiang
Copy link
Author

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

@JakeLin
Copy link
Owner

JakeLin commented Oct 20, 2016

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

2016-10-20 16:45 GMT+11:00 蒋轩哲 [email protected]:

多谢老师指点!在做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
.

@XuanZheJiang
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants