我使用transitionFromView和.TransitionFlipFromLeft将视图替换为另一个视图.
然后我想在视图上方没有阴影的情况下翻转视图.
然后我想在视图上方没有阴影的情况下翻转视图.
UIView.transitionFromView( self.postListView,toView: self.userListView,duration: 0.8,options: .TransitionFlipFromLeft,completion: nil )
解决方法
试试这个……
[UIView beginAnimations:@"View Flip" context:nil]; [UIView setAnimationDuration:3.25]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:YES]; [self.navigationController pushViewController:SecondViewController animated:NO]; [UIView commitAnimations];
这是如何在swift 3中执行卡片翻转动画:
UIView.transition(来自:frontImageView,
to: backImageView,duration: 0.65,options: .transitionFlipFromRight,completion: nil)