2009-12-02 35 views

回答

8
UITabbarcontroller.tabbar.userInteractionEnabled = NO; 
+0

+1 - 這救了我一些時間今晚。謝謝。 – 2011-04-19 02:01:05

+0

好的答案,但(tabBar)區分大小寫,所以命令應該是:self.tabBarController.tabBar.userInteractionEnabled = NO; – DeZigny 2013-07-13 10:08:23

3

您還可以設置您的UITabBarControllerDelegate爲以下委託方法返回NO:

- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController;