> On 08 Mar 2017, at 8:46 am, Jeremy Hughes <[email protected]> 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 protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to