I have set an animation block to start when the user performs a search. When the search is complete a new view is pushed. This works fine until the user selects the back button and attempts the search again, now the animation does not start.
[UIView animateWithDuration:0.25
delay:0.0
options:(UIViewAnimationOptionRepeat | UIViewAnimationOptionCurveLinear)
animations:^{
_collectionImage.transform = CGAffineTransformMakeRotation(M_PI);
}
completion:^(BOOL finished){
NSLog(@"Done!");
}];
The animation is just a spinning disc before anyone asks, and the completion block is called when the pushed view loads. Any help to why it will not animate on multiple searches would be appreciated.
Thanks.
hi this is your problem…
your change the affine value x to y
so now your transform value is y then again your equating to y =y
then how it could work….
initially you need to store the transform value the then animate it after completing the animation you need to restore the value
in
viewDidLoaddo like this:try this…. this is an idea you need to implement as your logic…