Unbalanced calls to begin/end appearance transitions with storyboard and adaptive segues

I’m using storyboard and have the following VCs:

UISplitViewController (Master) > UITabbarController > UINavigationController > UITableViewController

UISplitViewController (Detail) > UINavigationController > UIViewController

I’d like to show login screen on startup.

I’ve added following lines:

    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    window?.rootViewController = self.window!.rootViewController as! UISplitViewController
    window?.makeKeyAndVisible()

    if isAuthorized() == false {
        let loginVc = UIStoryboard("Main", bundle: nil).instantiateViewControllerWithIdentifier("Loginn") as! LoginVC
        loginVc.modalTransitionStyle = .CrossDissolve
        loginVc.modalPresentationStyle = .PageSheet
        svc.presentViewController(loginVc, animated: true, completion: nil)
    }

    return true
}

While iPad works fine, iPhone shows me message in console:

Unbalanced calls to begin/end appearance transitions for
< MyProj. SplitViewController: 0x7fa4c9525470 >

How should I present login controller to silence that warning?


Source: ios

Leave a Reply