在iPhone上翻转完整的UITAB视图

在iPhone上翻转完整的UITAB视图,iphone,animation,uitabbar,flip,Iphone,Animation,Uitabbar,Flip,我在iPhone上有一个基于TabView的应用程序。在初始加载时,我想翻转屏幕以显示一些设置 在我的AppDelegate中,选项卡视图添加到窗口中,并带有 [window addSubview:tabBarController.view]; 我在网上浏览发现: [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:1.0]; [UIView setAnimationTransition:UIViewAn

我在iPhone上有一个基于TabView的应用程序。在初始加载时,我想翻转屏幕以显示一些设置

在我的AppDelegate中,选项卡视图添加到窗口中,并带有

[window addSubview:tabBarController.view];
我在网上浏览发现:

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft
                       forView:tabBarController.view
                         cache:YES];
[window addSubview:settingsViewController.view];
[UIView commitAnimations];
但当我在模拟器中测试时,我能看到的唯一变化是TabMenu从右向左浮动

[settingsViewController.view setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
[tabBarController presentModalViewController:settingsViewController animated:YES];

这个问题可以解决吗?

您可以将设置视图显示为模式视图。可以指定要从右向左翻转的动画

[settingsViewController.view setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
[tabBarController presentModalViewController:settingsViewController animated:YES];
返回:

[self.parentViewController dismissModalViewControllerAnimated:YES];

您可以将设置视图显示为模式视图。可以指定要从右向左翻转的动画

[settingsViewController.view setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
[tabBarController presentModalViewController:settingsViewController animated:YES];
返回:

[self.parentViewController dismissModalViewControllerAnimated:YES];

谢谢,成功了。但我必须插入一个navigationController:

UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:settingsViewController];

[navigationController setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
[tabBarController presentModalViewController:navigationController animated:YES];

[navigationController release];
[settingsViewController release];

但是现在下一个问题:我该怎么回去?:)谢谢,这很有效。但我必须插入一个navigationController:

UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:settingsViewController];

[navigationController setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
[tabBarController presentModalViewController:navigationController animated:YES];

[navigationController release];
[settingsViewController release];
但是现在下一个问题:我该怎么回去?:)