Key part is shouldAutorotateToInterfaceOrientation(deprecated), shouldAutorotate, preferredInterfaceOrientationForPresentation, supportedInterfaceOrientations.
These are settings for portrait and rotation

UINavigationController

Next is UINavigationController.
If you use UINavigationController directly, child ViewController setting doesn’t work.