从 UITabBarController 的 moreNavigationController 中移除 rightBarButtonItem [英] Removing the rightBarButtonItem from moreNavigationController of UITabBarController
本文介绍了从 UITabBarController 的 moreNavigationController 中移除 rightBarButtonItem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的应用程序中添加了 tabBar
并使用以下代码删除了 rightBarButtonItem
:
I have added tabBar
in my app and remove the rightBarButtonItem
with the code:
UITableView *moreTableView = (UITableView *)tabController.moreNavigationController.topViewController.view;
tabController.moreNavigationController.navigationBar.topItem.rightBarButtonItem = nil;
现在,当我导航到其他屏幕并单击tabBar
的More
按钮时,rightBarButtonItem
再次出现.如果我使用后退导航按钮,它不会出现并且工作正常.但是,当我点击 tabBar 中的 More
按钮时,它会再次出现.
Now, when I navigate to other screen and click More
button of tabBar
, rightBarButtonItem
appears again. If I uses back navigation button it doesn't appear and works fine. However, when I tap More
button from tabBar it appears again.
推荐答案
我用过
tabController.customizableViewControllers = nil;
而且效果很好:)
这篇关于从 UITabBarController 的 moreNavigationController 中移除 rightBarButtonItem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文