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.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, Profile,Activities,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..
How can I do it..?I couldnot get …
When login is successful I m writing this code.
UITabBarController *tabBarController=[[UITabBarController alloc]init];
SearchViewController *searchViewController=[[SearchViewController alloc]initWithNibName:@"SearchViewController" bundle:nil];
Profile *userprofile=[[Profile alloc]initWithNibName:@"Profile" bundle:nil];
userprofile.title=@" Profile";
Activities *activities=[[Activities alloc]initWithNibName:@"Activities" bundle:nil];
activities.title=@"Activities";
tabBarController.viewControllers=[NSArray arrayWithObjects:searchViewController,userprofile,activities, nil];
[self presentModalViewController:tabBarController animated:NO];
Now I want to add another tabbaritem as Logout and when it is clicked I want to load a tabbarcontroller with Searchview and LoginView again..How?
Any help would be appreciated..
write below code on tapping logout