How can I flip an UIImageView?
Using @Fellowsoft code I have create a method rotation Animation.
thanks to Fellowsoft!!
-(void)rotateImage:(UIImageView*)image withDuration:(float)duration isHorizzonal:(BOOL)horizontal{
[UIView animateWithDuration:duration/2.0 animations:^{image.transform = horizontal?
CGAffineTransformMake(image.transform.a * -1, 0, 0, 1, image.transform.tx, 0)
:CGAffineTransformMake(1, 0, 0, image.transform.d * -1, 0, image.transform.ty);}
completion:^(BOOL finished)
{
//half animation
[UIView animateWithDuration:duration/2.0 animations:^{image.transform = horizontal?
CGAffineTransformMake(image.transform.a * -1, 0, 0, 1, image.transform.tx, 0)
:CGAffineTransformMake(1, 0, 0, image.transform.d * -1, 0, image.transform.ty);}
completion:^(BOOL finished) { }];
}];
}