我有一個tabBarController應用和使用的.xib文件的界面不是故事板 我都默認這個代碼顯示登錄屏幕前標籤控制器視圖
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
UIViewController *viewController1 = [[PopAdsFirstViewController alloc] initWithNibName:@"PopAdsFirstViewController" bundle:nil];
UIViewController *viewController2 = [[PopAdsSecondViewController alloc] initWithNibName:@"PopAdsSecondViewController" bundle:nil];
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, nil];
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];
return YES;
我創建了一個登錄查看的appdelegate並且不知道如何在tabBarView之前顯示它,並在成功登錄後隱藏t。
它的工作原理可以用
LoginViewControllerDelegate
在您的.h然後。我怎麼能隱藏它? – Kassem 2011-12-21 13:14:04
@KassemBagher我用隱藏代碼編輯了我的答案,並鏈接到模態ViewControllers上的文檔。 – 2011-12-21 13:17:24