• 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
CALayer's delegate prevents implicit animation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CALayer's delegate prevents implicit animation?


  • Subject: CALayer's delegate prevents implicit animation?
  • From: Seth Willits <email@hidden>
  • Date: Wed, 18 Dec 2013 10:51:41 -0800

Short version:

In 10.9 only: My CALayer's delegate doesn't implement **any** delegate methods, but because a delegate is set, the layer's position will not implicitly animate. If I don't set it, it works fine.




Longer version:

I have a view hosting a very plain root layer, and then this layer in question as a sublayer of that root layer.


rootLayer = [[CALayer alloc] init];
self.layer = rootLayer;
self.wantsLayer = YES;

rootLayer.frame / bounds / delegate = ...;

sublayer = [[CALayer alloc] init];
sublayer.frame / bounds = ...;
sublayer.delegate = self;



Later on I simply move it...

[CATransaction begin];
	[CATransaction setAnimationDuration:1.0];
	[CATransaction setAnimationTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];

	sublayer.position = newPosition;
[CATransaction commit];



... and it's not animating. I have narrowed it down to the delegate being non-nil, even if the delegate implements none of the delegate methods. If I don't set it, it works fine. This was working fine for yeeeeeeears and now in 10.9 it's behaving differently.


What could possibly be happening?



--
Seth Willits




_______________________________________________

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


  • Follow-Ups:
    • Re: CALayer's delegate prevents implicit animation?
      • From: David Duncan <email@hidden>
  • Prev by Date: Re: AudioUnit Cocoa gui displays popup which steals spacebar from the host
  • Next by Date: Re: CALayer's delegate prevents implicit animation?
  • Previous by thread: Re: AudioUnit Cocoa gui displays popup which steals spacebar from the host
  • Next by thread: Re: CALayer's delegate prevents implicit animation?
  • Index(es):
    • Date
    • Thread