lostInTransit
lostInTransit

Reputation: 71037

Why isn't animation stop selector called?

I am using the following code for calling a method once my animation stops

[UIView beginAnimations:@"swipe" context:NULL];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(transitionDidStop:finished:context:)];
[UIView setAnimationDuration:0.3f];

//My Animation

[UIView commitAnimations];

And this is the signature of the transitionDidStop method

- (void)transitionDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context

But I noticed that the method is never called even after the transition stops. Why is that?

Upvotes: 0

Views: 3394

Answers (1)

oxigen
oxigen

Reputation: 6263

Because you need

- (void)transitionDidStop:(NSString *)animationID finished:(BOOL)finished context:(void *)context

method

But you have

- (void)transitionDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context

Upvotes: 1

Related Questions