dekatotoro / dekatotoro/SlideMenuControllerSwift
Not able to add tabbarcontroller to leftviewcontroller in swift
- Dominant language
- Swift
- Stars
- 3.4k
- Forks
- 742
- PR merge metrics
- No merged PRs in 30d
Description
Thanks for the great library. But, we are facing some issue, i.e, I have added 5 viewcontrollers to leftviewcontroller. so its showing 4 rows in left side tableview. But, I am trying to add 2 cell data to navigate to tabbarcontroller for that we added like following.
```
var viewAssetMainTabBarViewController: UITabBarController!
override func viewDidLoad() {
super.viewDidLoad()
let viewAssetsTabbarController = storyboard.instantiateViewController(withIdentifier: "ViewAssetMainTabBarViewController") as! ViewAssetMainTabBarViewController
}
func changeViewController(_ menu: LeftMenu) {
switch menu {
case .assets:
self.slideMenuController()?.changeMainViewController(self.viewAssetMainTabBarViewController, close: true)
}
But, after clicking on that row in tableview its getting crashed and throwing following error in console
Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value
```
Can anyone suggest me, how to fix this?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.