0

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

Ron
  • 1,610
  • 15
  • 23

2 Answers2

2

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.

Alex
  • 26,829
  • 3
  • 55
  • 74
  • WebView's don't support being layer-backed, so -setWantsLayer: is not a good idea. Your only supported way to get animations in a WebView at present is to use CSS animations. – Mike Abdullah Oct 25 '09 at 16:16
0

I don't think this works because webview doesn't seem to like core animation enabled in any view containing it. I'd simply like to get a drop shadow or blur effect on the screen behind my webview and I've tried enabling it in the parent or even in a view behind the webview... but nothing seems to work. I may be doing something wrong though.

Pat Niemeyer
  • 5,930
  • 1
  • 31
  • 35