Re: WebView drawRect
Re: WebView drawRect
- Subject: Re: WebView drawRect
- From: Leonardo <email@hidden>
- Date: Fri, 21 Mar 2014 21:06:07 +0100
- Thread-topic: WebView drawRect
Thank you! It works.
Yes, I put just HTML code into the WebView.
And since the HTML code could represent everything as graphics, text,
tables... I have to give to that box, the same options as well as all the
other objects, thus even flip H and flip V.
The layer did the trick. I have just put the WebView within another NSView
and on this nsview I coded:
self.wantsLayer = YES;
self.layer.transform = CATransform3DMakeRotation(M_PI, 0.0f, 1.0f, 0.0f);
and it works! I could even animate that, as Jens said.
I am still dealing with the autoresizing, but I think I will get that out
soon. Thank you all. I'm very glad.
Regards
-- Leonardo
Da: Jens Alfke <email@hidden>
Data: Fri, 21 Mar 2014 12:19:18 -0700
A: Kyle Sluder <email@hidden>
Cc: Leonardo <email@hidden>, <email@hidden>
Oggetto: Re: WebView drawRect
On Mar 21, 2014, at 12:14 PM, Kyle Sluder <email@hidden> wrote:
> Unless WebView has some special dispensation that I don't know about,
> assigning layers to views and mutating a view's layer are not supported
> operations.
OK, then nest the WebView in a custom NSView and transform that view¹s
layer. Same effect.
> Both of these would be particularly troublesome for WebViews,
> considering they may make use of IOSurface to pass off rendering to
> plugins.
Yeah, I thought of that, but it sounds like Leonardo is just putting simple
HTML in the view.
Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden