Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
CATransition and animationDidStop:finished: delegate method.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CATransition and animationDidStop:finished: delegate method.



Hello there

I have successfully set up my view subclass to use CATransition as below:

- (void)updateSubviewsTransition {
_transition = [CATransition animation];
[_transition setDelegate:self];
[_transition setType:kCATransitionFade];
[_transition setSubtype:kCATransitionFromLeft];
[_transition setDuration:1.0];
[self setAnimations:[NSDictionary dictionaryWithObject:_transition forKey:@"subviews"]];
}


The view subclass receives
[self setWantsLayer:YES]
and then
[[self animator] replaceSubview:[[self subviews] objectAtIndex:0] with:newView]
to animate the replaceSubview.


I had hoped that when the transition was complete I would receive an animationDidStop:finished: on my delegate.
But this does not seem to occur. Should it?
I need to set [self setWantsLayer:NO] once the transition is complete
as the persistent presence of the layer affects the live resizing redraw behaviour of the subviews (NSTableView contents blank out).


NSTimer is waiting in the wings.

Regards

Jonathan
_______________________________________________

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




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.