• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Layer-backed view issue with isOpaque
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: NSWindow - how to resize it keeping aspect ratio?
  • Next by Date: Re: NSTableView ignores changes to cell's objectValue outside mouse tracking methods?
  • Previous by thread: Re: NSTableView ignores changes to cell's objectValue outside mouse tracking methods?
  • Next by thread: UITableView Won't Update; Crashes with EXC_BAD_ACCESS
  • Index(es):
    • Date
    • Thread