iOS Flip UIView没有阴影

时间:2016-07-24 04:47:17

标签: ios swift uiview

我使用transitionFromView.TransitionFlipFromLeft将视图替换为另一个视图。 然后我想在视图上方没有阴影的情况下翻转视图。

UIView.transitionFromView(
 self.postListView,
 toView:     self.userListView,
 duration:   0.8,
 options:    .TransitionFlipFromLeft,
 completion: nil
)

enter image description here

1 个答案:

答案 0 :(得分:0)

试试这个..

[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)