我目前正在使用来自以下位置的 Swift Popup 库:
https://github.com/Orderella/PopupDialog
尽管有一件事,但每个人都认为工作正常。当方向更改时,弹出对话框会旋转...这个事实与我的实现相冲突:
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 存储库和各种帖子,但没有提示......
谢谢和问候!
您是否尝试过将应用程序定向设置为仅纵向..