views:

560

answers:

2

how do i find that flip animation has finished animation?

i want to update a label's text just after animation has finished..

or how do i update a view during flip animation.?

+2  A: 

Have you tried setting the animation delegate and then responding to the 'animation did stop' event?

    ...
    [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
    [UIView setAnimationDelegate:self];
    ...
    [UIView commitAnimations];
    ....
}

- (void)animationDidStop:(NSString*)animationID finished:(NSNumber*)finished context:(void *)context {
    // Update text label
}
teabot
+3  A: 

Please beware @selector(animationDidStop:finished:context:) is considered a private API and WILL get your app rejected:

Thank you for submitting XXXXX to the App Store. Unfortunately it cannot be added to the App Store because it is using a private API. Use of non-public APIs, which as outlined in the iPhone Developer Program License Agreement section 3.3.1 is prohibited:

"3.3.1 Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs."

The non-public API that is included in your application is: animationDidStop:finished:context:.

onedgepr