gpt4 book ai didi

objective-c - xcode 无法隐藏 tabbarcontroller

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

我有一个 tabbarcontroller 作为主 Controller ,当一个 View 被推送时,我想隐藏它。我使用 hidesBottomBarWhenPushed 但不工作。谢谢。

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
self.hidesBottomBarWhenPushed = YES;
}
return self;
}

最佳答案

当您推送此 Controller 时,尝试在其父 View Controller 中添加此行:

    YourViewController *controller = [[YourViewController alloc]init....];
controller.hidesBottomBarWhenPushed = YES;
//then push the view controller

祝你好运

关于objective-c - xcode 无法隐藏 tabbarcontroller,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8487157/

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