dekatotoro / dekatotoro/SlideMenuControllerSwift
Unbalanced calls to begin/end appearance transitions
- Dominant language
- Swift
- Stars
- 3.4k
- Forks
- 742
- PR merge metrics
- No merged PRs in 30d
Description
Hi, maybe I do something wrong, but when I add LoginController and check if I logged or not logged in then I see
2016-03-09 03:59:50.400 SlideMenuControllerSwift[2738:84867] Unbalanced calls to begin/end appearance transitions for .
My MainViewController
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
let prefs:NSUserDefaults = NSUserDefaults.standardUserDefaults()
let isLoggedIn:Int = prefs.integerForKey("ISLOGGEDIN") as Int
if (isLoggedIn != 1) {
delegate?.changeViewController(LeftMenu.Login)
} else {
print("Logged in");
}
}
My LeftViewController
func changeViewController(menu: LeftMenu) {
switch menu {
case .Main:
self.slideMenuController()?.changeMainViewController(self.mainViewController, close: true)
case .Logout:
logout()
case .Login:
self.slideMenuController()?.changeMainViewController(self.loginController, close: true)
}
}
```
func logout(){
let appDomain = NSBundle.mainBundle().bundleIdentifier
NSUserDefaults.standardUserDefaults().removePersistentDomainForName(appDomain!)
changeViewController(LeftMenu.Main)
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the warning using MainViewController.viewDidAppear and the LeftViewController.changeViewController path, focusing on the .Login case and changeMainViewController call. Trace the login transition and its surrounding appearance callbacks; done means switching between Main, Login, and Logout no longer emits an unbalanced appearance-transition warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100