How do I handle orientation changes in the presenting UIViewController when using a custom transition

I have a UIViewController as the root view controller that presents another UIViewController using a custom transition. When you rotate the device while looking at the child view controller, then go back to the root view controller, the root view controller's view frame isn't updated. I've narrowed it down to the presence of a custom transition, i.e. if you don't have a custom transition, it works just fine. What would be the best way to have the custom transition and have the root view controller handle orientation changes appropriately?


I have a demo project available here: https://github.com/rawbee/TestOrientation