I'm working for a IOS9+ project using swift , using the same slide menu (Which is done programmatically) to translate between view controllers as shown in the link : Slide Menu and it working fine
the problem is it's using storyboard ID for each view controller in the function addChildView():
func addChildView(storyBoardID: String, titleOfChildren: String, iconName: String) {
let childViewToAdd: UIViewController = storyboard!.instantiateViewControllerWithIdentifier(storyBoardID)
tabOfChildViewController += [childViewToAdd]
tabOfChildViewControllerName += [titleOfChildren]
tabOfChildViewControllerIconName += [iconName]
menuToReturn.append(["title":titleOfChildren, "icon":iconName])
}
which is called in TransitionBetweenTwoViews function :
func transitionBetweenTwoViews(subViewNew: UIViewController){
//Add new view
addChildViewController(subViewNew)
subViewNew.view.frame = (self.parentViewController?.view.frame)!
view.addSubview(subViewNew.view)
subViewNew.didMoveToParentViewController(self)
//Remove old view
if self.childViewControllers.count > 1 {
//Remove old view
let oldViewController: UIViewController = self.childViewControllers.first!
oldViewController.willMoveToParentViewController(nil)
oldViewController.view.removeFromSuperview()
oldViewController.removeFromParentViewController()
}
print("After Remove: \(self.childViewControllers.description)")
}
that is called in the delegate of the BaseViewController Class
My problem is that I'm not using storyboard instead a nib file for each view controller , how could i do it without storyboard I have been searching for days to find solution but nothing work
Also the tableView of the menu is a table with sections
Please if you have any solution that could help it will be appreciated or any other slide menu that work with nib files
Edit : Slide Menu table View : screen shot of slide menu with section so if i choose Flight Availability or Ticket Balance it will be like i choose home with index 0 how could i solve that ?