Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Swift-弹出对话框禁用方向_Swift_Popup_Orientation_Landscape_Portrait - Fatal编程技术网

Swift-弹出对话框禁用方向

Swift-弹出对话框禁用方向,swift,popup,orientation,landscape,portrait,Swift,Popup,Orientation,Landscape,Portrait,我目前正在使用Swift弹出式库,来自: 尽管有一件事,但一切都很好。当方向改变时,弹出对话框将旋转。。。这一事实与我的实施相冲突: override func viewWillAppear(_ animated: Bool) { UIDevice.current.setValue(Int(UIInterfaceOrientation.landscapeRight.rawValue), forKey: "orientation") } override func viewDidApp

我目前正在使用Swift弹出式库,来自:

尽管有一件事,但一切都很好。当方向改变时,弹出对话框将旋转。。。这一事实与我的实施相冲突:

override func viewWillAppear(_ animated: Bool) {
    UIDevice.current.setValue(Int(UIInterfaceOrientation.landscapeRight.rawValue), forKey: "orientation")
}

override func viewDidAppear(_ animated: Bool) {
    self.tabBarController?.setTabBarVisible(visible: false, animated: true)
}
如何在弹出对话框中禁用方向开关

我已经研究了他们的github回购和各种帖子,但没有任何提示


谢谢和问候

您是否尝试将应用程序定向为仅纵向