Re: Layer-hosting views and layer-backed scroll views
Re: Layer-hosting views and layer-backed scroll views
- Subject: Re: Layer-hosting views and layer-backed scroll views
- From: David Duncan <email@hidden>
- Date: Fri, 21 May 2010 10:43:38 -0700
On May 21, 2010, at 10:37 AM, Troy Stephens wrote:
> By the way: I don't know whether CAGradientLayer disregards -setNeedsDisplay (since the layer renders its content programmatically), possibly making this irrelevant in practice, but in cases like this, where you provide a layer of your own that already has content, and you don't want AppKit to ever invoke the view's -drawRect: to draw view content into the layer, it's a good idea to -setLayerContentsRedrawPolicy:NSViewLayerContentsRedrawNever on the view.
The CAGradientLayer (and the CAShapeLayer) both respect -setNeedsDisplay and go through the normal CG drawing path, so it would definitely be recommended to specify the never redraw policy.
--
David Duncan
Apple DTS Animation and Printing
_______________________________________________
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