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

How to get current contentViewController and menuViewController #122

Open liuxuan30 opened 9 years ago

liuxuan30 commented 9 years ago

I created rootVC inherit from REFrostedViewController and did the initialization in awakeFromNib, just like the demo.

Now In my SideBar view controller, I would like to jump to another View controller, and how to get the current rootVC object? I don't want to use instantiateViewControllerWithIdentifier just like in the demo to create new view controllers to achieve the jump, kind of waste to create such view controllers.

I am trying to use self.frostedViewController.contentViewController, but it seems like it returned a different view controller, not the rootVC.contentViewController

Code: @implementation RootViewController

The log is: Inited Conteng VC is: UINavigationController: 0x7fb582e27750, menu VC is: SideBarController: 0x7fb582d8aef0

new navi VC content VC is UINavigationController: 0x7fb582c65b50

current frosted content VC is UINavigationController: 0x7fb582d9b1d0