I tried animating a sequence of UIViews from a mutable array to simulate this animation
for(int k = 0; k< [imageViewCarrier count] ; k++){
UIView *transformingView = [imageViewCarrier objectAtIndex:k];
[UIView animateWithDuration:30.0 animations:^{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:30.0];
[UIView setAnimationDelegate:self];
[UIView transitionFromView:transformingView toView:splicedImageView duration:3 options:UIViewAnimationOptionTransitionFlipFromLeft completion:NULL];
[UIView commitAnimations];
}completion:^(BOOL finished){
NSLog(@"Transition done");
}];
}
The animation seems to be too fast. Any suggestions on this. Did search some documentation but couldn’t figure it out. Some help would be greatly appreciated!
Hm, I think you might be doing it the wrong way. If memory serves me, when using
[UIView animinateWithDuration:animiations:completion:], you shouldn’t call[UIView beginAnimations:nil context:NULL];and[UIView commitAnimations];orsetAnimationDelegate:orsetAnimationDuration:for that matter, since they are the old way of animating views that you had to use before the block-based methods were introduced.I’d try leaving those out and see what happens. Also, note that the duration parameter is in seconds, so
30.0seems a bit too long.And just a style note: the “proper” Objective-C way to iterate through a collection is as follows: