我想翻转一个imageView(左/右),但我找不到UIView(或UIImageView)方法来做到这一点?任何的想法?
谢谢!
我认为你唯一想要的是:
UIView的的
+ (void)setAnimationTransition:(UIViewAnimationTransition)transition forView:(UIView *)view cache:(BOOL)cache;
和
UIViewAnimationTransitionFlipFromLeft, UIViewAnimationTransitionFlipFromRight,
这些动画过渡只能在动画块中使用.在容器视图上设置转换,然后换出旧视图以用于新视图,然后提交动画.
喜欢:
CGContextRef context = UIGraphicsGetCurrentContext(); [UIView beginAnimations:nil context:context]; [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:yourContainerView cache:YES]; [yourContainerView exchangeSubviewAtIndex:0 withSubviewAtIndex:1]; [UIView commitAnimations];