Xcode 4.3에 탭 표시 줄 응용 프로그램이 있는데 탭바가 표시되기 전에 로그인 화면을 삽입하려고합니다. presentModalViewController
에 animated:YES
이있는 경우 앱이 정상적으로 작동하지만 애니메이션이없는 경우보기가 표시되지 않습니다.탭 응용 프로그램이 표시되지 않습니다.
@synthesize window = _window;
@synthesize tabBarController = _tabBarController;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
UIViewController *viewController1 = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
UIViewController *viewController2 = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, nil];
self.window.rootViewController = self.tabBarController;
LogInViewController *logViewController = [[LogInViewController alloc] initWithNibName:@"LogInViewController" bundle:nil];
[self.window addSubview:_tabBarController.view];
[self.tabBarController presentModalViewController:logViewController animated:YES];
//This wont work
//[self.tabBarController presentModalViewController:logViewController animated:NO];
[self.window makeKeyAndVisible];
return YES;
}
-(void)loginDone{
NSLog(@"back to the app delegate");
[self.tabBarController dismissModalViewControllerAnimated:YES];
}
- 이 할 수있는 올바른 방법인가?
- 코드가
animated:NO
과 작동하지 않는 이유는 무엇입니까? - 출력이
Unbalanced calls to begin/end appearance transitions for <UITabBarController: 0x689d350>
인 경우에도이 정보를 얻을 수 있습니다.