I have used the following code from these questions to disable the rotation animation. It works for for iPhone devices but does not work for iPads.
The view controller in question is the root view controller of a navigation controller that is being presented modally.
Does anyone know why the following method would work on an iPhone but not an iPad?
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
coordinator.animate(alongsideTransition: nil) { _ in UIView.setAnimationsEnabled(true) }
UIView.setAnimationsEnabled(false)
super.viewWillTransition(to: size, with: coordinator)
}
StackOverflow Questions
Disable orientation change rotation animation
In 7.3/9/2+ Swift how to disable rotation animation, when device rotates?