推视控制器翻转过渡不包括导航栏

时间:2015-03-04 16:02:26

标签: ios objective-c uiview uinavigationcontroller uinavigationbar

我正在推动一个视图控制器,同时动画它以便翻转。但是,动画仅应用于导航栏下方的视图,因此导航栏会隐藏几秒钟然后再次突然显示。如何将动画应用于整个视图,包括导航栏?

UIStoryboard *sb = [UIStoryboard storyboardWithName:@"OverviewiPad" bundle:nil];
OverviewViewController *overviewVC = [sb instantiateViewControllerWithIdentifier:@"OverviewViewController"];
overviewVC.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;

[UIView  beginAnimations:nil context:NULL];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.75];
[self.navigationController pushViewController:overviewVC animated:NO];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:NO];
[UIView commitAnimations];

0 个答案:

没有答案