Re: needsDisplay and subviews
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