As what the title suggests, I would like to be able to lock all my tab bars except for one. And only after the user completes an action will I enable all the rest of the tab bars. How can I do that?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I haven’t tried it, but according to the docs, you can return NO from the
tabBarController:shouldSelectViewController:delegate.[UPDATE] I just tried that out of curiosity – it seems to work fine. Create a new project from the “Tab bar application” template and then go to the
-viewDidLoadof your FirstViewController. Add this line:and then implement the delegate method:
Don’t forget to conform to
<UITabBarControllerDelegate>in your .h file!Hope that helps.