[UIDevice.currentDevice setValue:@(UIInterfaceOrientationPortrait) forKey:@"orientation"];
ios14.6 The code for rotating the screen does not take effect
Setting the orientation property of UIDevice is not supported. Consider using the supportedInterfaceOrientations property of UIViewController to control orientations instead.