webview in core animation layer

后端 未结 2 1702
再見小時候
再見小時候 2021-01-26 18:43

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?

cheers Ron

2条回答
  •  滥情空心
    2021-01-26 19:09

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

    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.

提交回复
热议问题