1
사용자가 로그인하지 않은 경우 내 앱에 4 개의 항목이있는 TabBar가 있습니다. 사용자가 로그인 한 경우 TabBar에는 5 개의 항목이 있습니다. 사용자가 로그인하면 사용자가 앱의 didFinishLaunchingWithOptions 방법 검사를 시작하면 는 :로그인 후 TabBar 항목 추가
ShoutboxViewController *viewController1 = [[ShoutboxViewController alloc] initWithNibName:@"ShoutboxViewController" bundle:nil];
UINavigationController *view1 = [[UINavigationController alloc] initWithRootViewController:viewController1];
...
self.tabBarController = [[UITabBarController alloc] init];
if (login == TRUE) {
self.tabBarController.viewControllers = [NSArray arrayWithObjects:view1, view4, view3, view5, view2, nil];
} else {
self.tabBarController.viewControllers = [NSArray arrayWithObjects:view1, view4, view3, view2, nil];
}
내 질문입니다 : 어떻게 탭을 추가/제거 할 수 있습니다 후 로그인/로그 아웃의 예를 들면,