gpt4 book ai didi

ios - 从 View 中删除 UINavigationBar

转载 作者:行者123 更新时间:2023-11-28 20:20:25 26 4
gpt4 key购买 nike

我在 UINavigationController 中嵌入了几个 VC。我不想显示导航栏。
我读到这个方法应该删除它,但我无法弄清楚要调用它的人或对象。

[viewController.navigationController setNavigationBarHidden:YES animated:YES];

谁能给我一个例子说明它是如何使用的?
或任何其他删除导航栏的方法。

最佳答案

你在 Root View Controller 上调用它。也就是说,您使用以下方法创建 UINavigationController 的 View Controller :

– initWithRootViewController:

关于ios - 从 View 中删除 UINavigationBar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16244736/

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