Skip to content

Commit 8e5ebe2

Browse files
committed
<fix> (FullScreenable): 修复设备已经横放后按钮点击无法正常进入全屏的bug
1 parent c711bfc commit 8e5ebe2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

LXFProtocolTool/Classes/FullScreenable/FullScreenable.swift

+2-3
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@ extension FullScreenable {
8888
UIView.animate(withDuration: _config.animateDuration) {
8989
// 强制横竖屏
9090
let orientation: UIInterfaceOrientation = _isEnter ? _config.enterFullScreenOrientation : .portrait
91-
if !_isEnter { // 防止已经竖屏导致无法退出全屏
92-
UIApplication.shared.lxf.rotate(with: UIApplication.shared.statusBarOrientation)
93-
}
91+
// 防止 设备已经竖放导致无法退出全屏 或 设备已经横屏导致无法进入全屏
92+
UIApplication.shared.lxf.rotate(with: UIApplication.shared.statusBarOrientation)
9493
UIApplication.shared.lxf.rotate(with: orientation)
9594
}
9695

0 commit comments

Comments
 (0)