Closed kristoff2016 closed 7 years ago
let myMusicViewController = MyMusicViewController() self.so_containerViewController?.topViewController = myMusicViewController
func handleFirst(){ let homeController = FirstController() self.so_containerViewController?.topViewController = homeController } I got crash
Which crash? Post a log.
Or screenshot. It would be better.
example I stayed home page when app loaded. then I go to another page ProfileVontroller then I back to home page. does it do the same ? let profileViewController = self.storyboard!.instantiateViewControllerWithIdentifier("profileViewController") self.so_containerViewController.topViewController = profileViewController
let homeController = FirstController()
You have to load this view controller from the storyboard, the same way as:
let profileViewController = self.storyboard!.instantiateViewControllerWithIdentifier("profileViewController")
After what?