Note that there are some explanatory texts on larger screens.

plurals
  1. POUnbalanced calls to begin/end appearance transitions for UITabBarController
    primarykey
    data
    text
    <p>I have an UITabBarController, when initial run, I want to overlay a login view controller but received error.</p> <blockquote> <p>Unbalanced calls to begin/end appearance transitions for &lt; UITabBarController: 0x863ae00 >.</p> </blockquote> <p>Below is the code. </p> <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; // Override point for customization after application launch. UIViewController *lessonVC = [[[LessonViewController alloc] initWithNibName:@"LessonViewController" bundle:nil] autorelease]; UIViewController *programVC = [[[ProgramViewController alloc] initWithNibName:@"ProgramViewController" bundle:nil] autorelease]; UIViewController *flashcardVC = [[[FlashCardViewController alloc] initWithNibName:@"FlashCardViewController" bundle:nil] autorelease]; UIViewController *moreVC = [[[MoreViewController alloc] initWithNibName:@"MoreViewController" bundle:nil] autorelease]; UINavigationController *lessonNVC = [[[UINavigationController alloc] initWithRootViewController:lessonVC] autorelease]; UINavigationController *programNVC = [[[UINavigationController alloc] initWithRootViewController:programVC] autorelease]; UINavigationController *flashcardNVC = [[[UINavigationController alloc] initWithRootViewController:flashcardVC] autorelease]; UINavigationController *moreNVC = [[[UINavigationController alloc] initWithRootViewController:moreVC] autorelease]; self.tabBarController = [[[UITabBarController alloc] init/*WithNibName:nil bundle:nil*/] autorelease]; self.tabBarController.viewControllers = [NSArray arrayWithObjects:lessonNVC, programNVC, flashcardNVC, moreNVC, nil]; self.tabBarController.selectedIndex = 0; self.window.rootViewController = self.tabBarController; [self.window makeKeyAndVisible]; if (![[ZYHttpRequest sharedRequest] userID]) { // should register or login firstly LoginViewController *loginVC = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil]; loginVC.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self.tabBarController presentModalViewController:loginVC animated:YES]; ZY_SAFE_RELEASE(loginVC); } return YES; } </code></pre> <p>Anyone who can help me? Thanks in advance!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload