webview在核心动画层

webview在核心动画层

本文介绍了webview在核心动画层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在CALayer内部创建一个webView。也许这太微不足道,但我只是把我的头进入CA。请任何人帮助?

I wanted to create a webView inside of a CALayer. Maybe it is too trivial but I am just getting my head into CA. Would anyone please be able to help?

干杯
Ron

cheersRon

推荐答案

视图可以包含图层,视图可以包含其他视图,图层可以包含图层。但是图层不能包含视图。

Views can contain layers, Views can contain other views, and layers can contain layers. But layers cannot contain views.

如果您想为 WebView 设置动画效果,在 NSView 中调用 setWantsLayer:YES ,然后使 code>的图层。

If you want to animate a WebView, your best bet would be to embed it in an NSView where you've called setWantsLayer:YES and then animating the WebView's layer.

这篇关于webview在核心动画层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 09:22