Re: Overlapping sibling views
Re: Overlapping sibling views
- Subject: Re: Overlapping sibling views
- From: Mike Abdullah <email@hidden>
- Date: Tue, 30 Apr 2013 09:42:00 +0100
On 30 Apr 2013, at 09:38, Robert Vojta <email@hidden> wrote:
>> I've never seen any evidence that sibling *NSView*s draw in the wrong order since 10.5. I believe that 'drawRect:' is correctly called in the back-to-front order of the sibling arrangement in the parent view.
>>
>> However, I *have* seen firsthand, in the last few weeks, that the layers of siblings under a layer-backed parent view were composited in a random order. In my case, I had two sibling views, and I observed the bottom one displaying "on top" unpredictably, about 50% of the time.
> Sorry for stepping in, but I have seen this behavior as well in the last week … I had this in the tree ...
>
> - NSView
> - NSView (layer backed for AVPlayer)
> - NSButton
>
> … and NSButton was invisible - to be more precise, this button wasn't drawn in correct order, but it did work = I was able to click on it. This invisibility was random. To fix correct drawing order, I had to set wantsLayer = YES on the root NSView as well. And then it was fixed and no more random invisibility.
Layer-backed views always *appear* above non-layer-backed views. Effectively, all non-layer-backed views get rendered into a single layer that makes up the entire window.
_______________________________________________
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