-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS 16的makeKeyWindow导致页面的Size发生不必要的变化 #573
Comments
@changsanjiang 加了一个ParentViewController之后,出现位移的概率大幅增加(这也是我项目目前的用法,再参杂其他逻辑,以及更多childviewcontroller,导致几乎复现率100%) 2022-09-17.10.43.19.mp4update: 小乌龙 update 2: 2022-09-17.11.06.47.mp4 |
同问,出现相同问题,在横屏旋转恢复到竖屏列表时候,contentOffset会变化 |
补充一个发现, |
已修复, SJBaseVideoPlayer 需要更新到 3.7.5; |
继续 #532 的讨论
必现/偶发?
项目必现,demo一定概率触发
描述bug
Landscape
转Portrait
的时候,必然会导致一次sourceWindow的size发生变化,而实际上此时rootViewController并不会发生转动,还是被触发了viewWillTransition
,{414, 896} -> {896, 414} -> {414, 896}这些逻辑在demo中无法很好体现,但是在实际项目中,会导致页面不必要的滑动,Player停止(注释掉所有的viewWillTransition方法也照旧)
Demo中是否存在同样的问题?
是
你期望的结果是什么?
不要触发
viewWillTransition
等其他操作运行环境
截图
makeKeyWindow之前的frame是正确的,在调用之后尺寸反而发生了变化
尝试采用的一些workaround:
viewWillTransition
还是会被触发SJRotationFullscreenWindow
的alpha
设置为0从而隐藏,效果较好。就算很复杂的项目,只要不触发旋转,就会减少很多意外changsanjiang/SJBaseVideoPlayer@master...hstdt:SJBaseVideoPlayer:master
额外的
和 #532 中的demo差距不大,就是增加了一个打印,展示window尺寸莫名发生了变化
player.zip
The text was updated successfully, but these errors were encountered: