Layer-backed view issue with isOpaque
Layer-backed view issue with isOpaque
- Subject: Layer-backed view issue with isOpaque
- From: Mathieu Coursolle <email@hidden>
- Date: Fri, 26 Feb 2010 15:22:13 -0500
Hi Cocoa developers,
I have a small application that consists of a NSTabView, in which all tabs contain a single
custom NSView. That custom view is layer-backed (setWantsLayer:YES in awakeFromNib).
So far, the view layer doesn't draw anything, and the NSView drawRect method fills its content
with a opaque colour.
Since the custom view fills its content with a background colour, I would assume that I can overwrite
isOpaque to return YES.
However, when I do so, there are artefacts that appear when I change tab. This behaviour goes away
if isOpaque returns NO.
From Apple's documentation:
"A view object is opaque if it completely covers its frame rectangle when drawing itself."
I would then assume it is the case for my custom view since its drawRect method fills the received rectangle with
a plain colour.
What I am not understanding properly here?
Thanks,
Mathieu
_______________________________________________
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