• 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
Re: needsDisplay and subviews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: needsDisplay and subviews


  • Subject: Re: needsDisplay and subviews
  • From: Ben Kennedy <email@hidden>
  • Date: Wed, 08 Mar 2017 09:01:54 -0800

> On 08 Mar 2017, at 8:46 am, Jeremy Hughes <email@hidden> wrote:
>
> If needsDisplay is set to true for an NSView, does that also cause subviews to be redrawn?

Admittedly I've been mostly doing iOS development for the last several years and barely any Mac lately, but, according to the current docs:

needsDisplay: "The displayIfNeeded methods check the value of this property to avoid unnecessary drawing, and all display methods set the value back to false when the view is up to date."

display(): "Displays the view and all its subviews if possible, invoking each of the NSView methods lockFocus(), draw(_:), and unlockFocus() as necessary."

Thus, it seems to follow that so long a custom view's display() calls super, then all of its subviews should also be drawn when its needsDisplay is true.

What sort of contradictions are out there?

b


_______________________________________________

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


References: 
 >needsDisplay and subviews (From: Jeremy Hughes <email@hidden>)

  • Prev by Date: needsDisplay and subviews
  • Next by Date: How do I use a NSTextBlock in an attributed string?
  • Previous by thread: needsDisplay and subviews
  • Next by thread: Re: needsDisplay and subviews
  • Index(es):
    • Date
    • Thread