在我的 HomeViewController 中有 homeView 和 loginView。当我在 homeview 中单击注销按钮时,我隐藏了 homeview 并显示 loginView。所以用户进入 homeView。我再次单击注销按钮 homeView 不隐藏
应用委托.m
HomeViewController *home =[[HomeViewController alloc]initWithNibName:@"HomeViewController" bundle:nil];
navigationController = [[UINavigationController alloc]initWithRootViewController:home];
[viewsArray addObject:navigationController];
[self.tabbarController setViewControllers:viewsArray];
homeViewController.m:
-(IBAction)logout:(id)sender
{
homeView.hidden=YES;
loginView.hidden=NO;
}