I am doing an app in which on startup of App,a tabbarController with Search and Login views will be presented.When I click on Search tabbaritem SearchView wil appear.When Login tabbaritem is clicked Login view will appear ..When the Login is successful a tabbarcontroller with Four tabbaritems(Search,MyProfile,MyActivities,Logout)will appear.Now when I click on logout I have to logout of the account and I need to show again the startup view.
Any help would be appreciated..
its related with your application architecture. i would like to divide your question :
I m pretty much new to objective-C and I m doing an app in which on startup of App,a tabbarController with Search and Login views will be presented.
Reply: Initially you need to have a navigation controller in the AppDelegate which will work like a parent navigation controller and you need to add your tabbar controller as a rootviewcontroller to it, it will help to get out of the second tabbar controller when you want to logout.
When the Login is successful a tabbarcontroller with Four tabbaritems(Search,MyProfile,MyActivities,Logout)will appear
Reply: Now when you get logged in then you will push a new tabbar controller with 4 tabs, it will get pushed on the parent navigation contrller (that we created in app deleate) .
Now when I click on logout I have to logout of the account and I need to show again the startup view
Reply: Now when you want to logout and after doing all the logout related stuff(like closing the session etc) if you want to pop the view controller like
[self.navigationController popViewController]it will not going to help you. as the self.navigation controller is the navigation controller of the new tabbar (of 4 tabs, that you pushed after login ). So you need to access the parent navigation controller here, which we created in app delegate into the Logout view controller, like :[appDelegate.navController poptoRootViewController].So the important point here is you need to have access and control over the parent navigation controller.
Hope this helps.