Re: CALayer's delegate prevents implicit animation?
Re: CALayer's delegate prevents implicit animation?
- Subject: Re: CALayer's delegate prevents implicit animation?
- From: Uli Kusterer <email@hidden>
- Date: Sun, 22 Dec 2013 10:51:46 +0100
On 18 Dec 2013, at 21:46, Sean McBride <email@hidden> wrote:
> Wait, what? You're saying a CALayer's delegate can't be its parent NSView? Why? Where does it say that? I've been doing that for years without apparent problem. I'd be interested to hear more…
It broke with 10.9 at the latest. From then on, NSView drawing code implements -drawLayer:inContext:, which breaks any use of the ‘content’ property of a CALayer whose delegate is a view. I don’t have any documentation, but the fact is it simply doesn’t work anymore in certain cases, which is an obvious sign Apple doesn’t expect you to do this. To be safe (not to mention avoid the obvious code smell of making a view a controller), use a separate object as the delegate.
Cheers,
-- Uli Kusterer
“The Witnesses of TeachText are everywhere...”
http://zathras.de
_______________________________________________
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