I'm trying to add a custom transition to a UIViewController which has a xib. I have tried a few approaches but they all have the same issue, the view displays for the wrong screen size.
My current example is based on the following tutorial: Custom UIViewController transition in iOS with Swift
I have made no changes to the TransitionDelegate or Animators.
Here's the view in the xib and in the simulator:
The white UIView is set to centre, 80% width with a 1:1 ratio.
My UIViewController is loaded using the following:
let thirdViewController = ThirdViewController()
thirdViewController.transitioningDelegate = viewTransitionDelegate
thirdViewController.modalPresentationStyle = .custom
navigationController?.present(thirdViewController, animated: true, completion: nil)
If I comment out setting the delegate the view will load 100% perfectly:
Finally, I have another UIViewController which has no xib and the constraints are set programmatically. This view is loaded with the same transition and loads perfectly:
What do I need to change to get this working with XIBs?