[英]Disable edit button from more tab bar application
我正在使用Storyboard創建一個包含6個選項卡的選項卡欄。 標簽欄是初始視圖控制器。 我沒有為tabbarcontroller使用任何自定義類。 更多標簽獲得“編輯”按鈕。 我該如何刪除該按鈕?
將tabBarController的customizableViewControllers設置為nil。
tabBarController.customizableViewControllers = nil;
最后為我的TabBarController創建了一個自定義類並執行了此操作
- (void)navigationController:(UINavigationController *)navigationController
willShowViewController:(UIViewController *)viewController
animated:(BOOL)animated {
UINavigationBar *morenavbar = navigationController.navigationBar;
UINavigationItem *morenavitem = morenavbar.topItem;
/* We don't need Edit button in More screen. */
morenavitem.rightBarButtonItem = nil;
}
這解決了它。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.