Disable user interaction on tabBar

darkman picture darkman · Dec 18, 2012 · Viewed 11.5k times · Source

I am displaying an image right after the app didFinishLaunchingWithOptions, the app consists in a tab bar, and in the first view i have some buttons. The user can only continue to use the app after he press the button in that first image, the problem is, some users can interact with the tab bar, and the buttons in the first view even with the image above all. How i can completely disable the user interaction on those buttons and in the tabBar, and enable then only when the button is pressed and the image disapear?

Answer

bibo bode picture bibo bode · Dec 18, 2012

To disable:

UITabBarController.tabBar.userInteractionEnabled = NO;

To enable:

UITabBarController.tabBar.userInteractionEnabled = YES;