Skip to content

Instantly share code, notes, and snippets.

@korgx9
Created January 28, 2017 16:08
Show Gist options
  • Save korgx9/ef5bf900d7c73654b157c4a656f9b2b1 to your computer and use it in GitHub Desktop.
Save korgx9/ef5bf900d7c73654b157c4a656f9b2b1 to your computer and use it in GitHub Desktop.
func changeViewController(menu: LeftMenu) {
self.controller = MenuNavigationController()
switch menu {
case .Search:
self.controller = MenuNavigationController(rootViewController:searchViewController)
self.slideMenuController()?.changeMainViewController(self.controller, close: true)
break
case .MyAdvertisements:
break
case .Messages:
let dialogsVC = dialogsStoryboard.instantiateViewController(withIdentifier: "DialogsTableViewController") as! DialogsTableViewController
self.slideMenuController()?.changeMainViewController(dialogsVC, close: true)
break
case .Favourites:
break
case .ContactUs:
break
case .AddAdvertisement:
break
case .Exit:
break
default:
break
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment