Re: Layer hosting views, geometryFlipped, and subviews
Re: Layer hosting views, geometryFlipped, and subviews
- Subject: Re: Layer hosting views, geometryFlipped, and subviews
- From: David Duncan <email@hidden>
- Date: Thu, 16 Dec 2010 09:41:12 -0800
On Dec 15, 2010, at 11:53 PM, Gideon King wrote:
> Hi, I have a layer *hosting* view which has to use the geometryFlipped option so that it behaves correctly, and need to add an NSTextView subview for editing sometimes, and an ordinary custom view for editing at other times.
>
> I am having trouble working out where to place the subview. It just seems to end up in strange places.
>
> I have noticed also that the subview is drawing with reversed flippedness. I am wondering if there is some workaround for this by either putting another layer or view in between my layer and the overlay view? I have tried some options but so far without success.
>
> I see that a previous question along very similar lines was asked by Kyle Sluder, but there didn't appear to be any replies to his question.
>
> Any suggestions would be most welcome.
Mostly because this particular question is kinda thorny :). I think the best solution here is to use parallel view hierarchy that contains whatever AppKit views you need to add rather than trying to add them to the layer hosted tree. Something like this:
Layer-backed view
Layer-hosted view
<layer tree>
Layer-backed view
<appkit views>
--
David Duncan
_______________________________________________
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