在iPhone上翻转完整的UITabView
我在 iPhone 上有一个基于 TabView 的应用程序。在初始加载时,我想翻转屏幕动画以显示一些设置。
在我的 AppDelegate 中,TabView 添加到窗口中,
[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 从右向左浮动。
这个问题能解决吗?
I have a TabView based application on the iPhone. On initial loading, I want to flip-animate the screen for showing some settings.
In my AppDelegate, the TabView is added to the window with
[window addSubview:tabBarController.view];
I browsed the web and found this:
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft
forView:tabBarController.view
cache:YES];
[window addSubview:settingsViewController.view];
[UIView commitAnimations];
But when I test this in the simulator the only change I can see is that the TabMenu floats from right to left.
Can this be solved?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以将设置视图呈现为模式视图。您可以指定从右向左翻转的动画。
返回:
You could present the settings view as a modal view. You can specify the animation to flip from right to left.
To return:
谢谢,这有效。但我必须插入一个导航控制器:
但现在下一个问题:我如何返回? :)
Thanks, that worked. But I had to insert a navigationController:
But now the next question: How do I get back? :)