dekatotoro / dekatotoro/SlideMenuControllerSwift
ViewDidAppear call more than once
- Dominant language
- Swift
- Stars
- 3.4k
- Forks
- 742
- PR merge metrics
- No merged PRs in 30d
Description
Let use this code after application start (replace window.rootViewController) :
```
let slideMenuController = SlideMenuController(mainViewController: mainViewController, rightMenuViewController: rightMenuViewController)
window.rootViewController = slideMenuController
```
`mainViewController. viewDidAppear` is call twice on iOs 10 because `SlideMenuController .viewWillLayoutSubviews` is called more than once and its implementation is strange : each time it uses `setUpViewController` which calls `addChildViewController`.
To my point of view, it's not a good practice to call `addChildViewController` on the same child several times (this duplicates viewController life cycle events). Is there a good reason for this, or is this a bug ?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.