romaonthego / REFrostedViewController

iOS 7/8 style blurred view controller that appears on top of your view controller.
MIT License
2.97k stars 494 forks source link

Navigation to other View Controllers using Segues #113

Open LarryBrian opened 9 years ago

LarryBrian commented 9 years ago

I implemented the project into mine. Set everything up but could not get the menu controller to navigate to any other view controllers except for the first one in my list which by following the example would be similar to the "Second View Controller". I then created segues in the menu vc class and used the performSegueMethod. This method worked except once the other view Controllers were presented I could not use the swipe gesture nor could I bring up the menu by tapping the "menu" nav bar button.

Please let me know any suggestions you might have to get this to work. Thanks!

milo-the-dev commented 9 years ago

I had the same issue. Instead of using a segue you have to call [self.storyboard instantiateViewControllerWithIdentifier:@"YOUR STORYBOARD ID HERE"];. This will allow for the menu button and pan gesture to work after initial navigation

liuxuan30 commented 9 years ago

It is hard coding something like

    DEMOSecondViewController *secondViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"secondController"];
    navigationController.viewControllers = @[secondViewController];
}

self.frostedViewController.contentViewController = navigationController;
[self.frostedViewController hideMenuViewController];
liuxuan30 commented 9 years ago

@MarlowCharite, will it cause some memory/state change issues, since we already initialized the view controllers, but when we a clicking on the side menu, it is not using other existing controllers, but create a new one and present it?