Avt
Avt

Reputation: 17043

Unbalanced calls to begin/end appearance transitions for <DGTabBarController: 0xd15e2e0>

I have following code in application: didFinishLaunchingWithOptions:

_tabBarController = [ [ DGTabBarController alloc ] init ];
_tabBarController.viewControllers = @[library, Login];

self.window.rootViewController = _tabBarController;
[_tabBarController presentCreationViewControllerWithYarn:nil];

and in DGTabBarController.m

- (void)presentCreationViewControllerWithYarn:(DGYarn*)yarn;
{
    DGPagesViewController *createPagesViewController = [[DGPagesViewController alloc] initWithYarn:yarn];
    [self presentViewController:createPagesViewController animated:YES completion:nil];
}

On every start I receive a warning in debug log "Unbalanced calls to begin/end appearance transitions for ."

How this could be fixed?

Upvotes: 1

Views: 585

Answers (1)

user3340566
user3340566

Reputation: 36

You are trying to start presenting animation when application is not ready yet. Try to change

[_tabBarController presentCreationViewControllerWithYarn:nil];

to

[_tabBarController performSelector:@selector(presentCreationViewControllerWithYarn:) withObject:0 afterDelay:0.01];

Upvotes: 2

Related Questions