Hi there,
I'm transitioning to a UIViewController via the toolbarController thus:
toolbarController?.transition(to:appDelegate.myViewController, completion: nil)
But the View Controllers viewWillTransition method is never called on subsequent device rotation events. Is there a missing viewWillTransition method in the toolbarController subclass hierarchy?
Hey! Let me take a look at this and see what should be happening.
OK, thanks Daniel!
I tested the ToolbarController samples project. All seems to be fine. I set the viewWillTransition function in the AppToolbarController class. May you send me a sample project that can reproduce this issue?
Hi Daniel,
I've been doing some digging into this issue and my usage of the library and I've found that I use the NavigationDrawerController sample as the basis of the App. Having looked at that sample again I noticed that there's a button on the LeftViewController that is supposed to trigger a transition to the "Transitioned" View Controller. This is done via the toolbarController.transition method. But this doesn't work - the transition method is invoked but the new view controller is not displayed.
I changed that transition code line to navigationDrawerController.transition and this worked - the correct "Transitioned" View Controller was displayed BUT the toolbar was missing. So I'm not sure what's going on - Should the toolbar transition work correctly? Is that a bug? When using NavigationDrawer to transition the toolbar disappears. Any thoughts?
You are using everything correctly, but are missing a key concept that I must write about as it will make a game changing difference for you when using Material and Motion. That said, I have been working on it and will aim to have it ready for you. The basic idea is that each controller component has a transition area. When you place rootViewControllers in the component, that rootViewController is the transition area. So if you transition from the navigationDrawerController.transition, the entire rootViewController will be changed. If you use the toolbarController.transition, it will transition the area that is the rootViewController of the ToolbarController. From the NavigationDrawerController if you call the toolbarController.transition, it will activate a change for that rootViewController and so on. Does this make sense? If it is not transitioning, there may be a bug, but I haven't seen one, so I would need to test or get a sample that demonstrates the issue.
That makes sense Daniel. It would really simplify the creation of more complex UI's :-)
Regarding the Sample App not transitioning, the problem exhibits it self in the vanilla sample NavigationDrawerController - just run it and select the left view controller then press "Transition VC" button and nothing happens...
Cool, I will check it out and see what's up.
The transition method should only fire when the size of the UIViewController changes. Triggering a transition call does not trigger the willTransition method. Apple is responsible for firing that call entirely. As for the transition not working, I had tested it now and all seems to be fine.


If you have any further issues or questions, please reopen this issue :) Thank you!