gpt4 book ai didi

iphone - UITabBar 导航和presentModalViewController

转载 作者:行者123 更新时间:2023-12-01 19:24:16 26 4
gpt4 key购买 nike

我有基于 UITabBar 的导航,并且希望始终将标签栏放在其他寡妇之上。在一个 Controller 中,我有打开另一个 Controller 的方法,但是当我使用这个 UITabBar 时消失。
我应该多做些什么?

ThirdView*third =[[ThirdView alloc] initWithNibName:nil bundle:nil];
third.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self.tabBarController presentModalViewController:third animated:YES];
[third release];

最佳答案

您应该使用 UINavigationController s 用于您的 UITabBarController 的标签.然后介绍一个新的UIViewController您想将新的推送到您的 UINavigationController 的堆栈中.你可以这样做:

[self.navigationController pushViewController:yourController animated:YES];



如果你想要模态效果,你可以这样做:
#import <QuartzCore/QuartzCore.h>

CATransition* transition = [CATransition animation]; transition.duration = 0.4f;
transition.type = kCATransitionMoveIn;
transition.subtype = kCATransitionFromTop;
[self.navigationController.view.layer addAnimation:transition
forKey:kCATransition]
[self.navigationController pushViewController:v animated:NO];

关于iphone - UITabBar 导航和presentModalViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8723683/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com