1、改变整个app的设备方向支持
2、代码改变app不同场景的设备旋转方向支持(可以在不同的viewController中处理对设备方向的不同需求)
ps.supportedInterfaceOrientations只能在根控制器中生效,即在navigationController或者tabbarController中生效
override var supportedInterfaceOrientations: UIInterfaceOrientationMask{
return .portrait
}
设置之后当前的控制器和子控制器都会遵守这个方向
ps.supportedInterfaceOrientations 是能在(tabbarController或者navigationController)中生效