I have application with 2 tab bars. In second tab bar I have navigation controller. I want to change this navigation controller to another navigation controller when “Change” button is pressed. How can I do that? Please help me.
Thanks
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.
You’d have to replace the View Controller in the TabBar using the
viewControllersproperty ofUITabBarControllerorsetViewControllers:animated:if you want to add some animation.But maybe you should think of having 2 views in a controller of yours and hide/show them when you click a button, maybe even pushing/popping view controllers without animation (
pushViewController:yourController animated:NO) on the navigation stack of your navigation controller and just hide the back button (self.navigationItem.hidesBackButton = YES)