-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
iOS16 创建YYTextView后 导致旋转屏幕失败 #973
Comments
@q858333 你好,请问这个问题解决了吗 |
YYText导致ioS16不能旋转,是因为YYTextEffectWindow这个单例window导致,在合适的时机把这个window设置成隐藏可以避免这个问题 |
找遍了屏幕旋转相关的代码,终于发现是这个问题。。。崩溃~有人解决了吗 |
我的问题是,App在特定场景允许横屏,但是大部分情况是不允许横屏的,加入YYTextView之后,应用界面没有横屏,但是手机状态栏可以横屏了 |
参考上面 @teethandnail 那位兄弟的解决方案啊 |
可以试着在进入业务前,找个地方初始化一个yytextview 临时变量,走一遍生命周期 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
UIWindowSceneGeometryPreferencesIOS *geometryPreferences = [UIWindowSceneGeometryPreferencesIOS.alloc initWithInterfaceOrientations:1 << orientation];
[ws requestGeometryUpdateWithPreferences:geometryPreferences
errorHandler:^(NSError * _Nonnull error) {
}];
创建YYTextView后,requestGeometryUpdateWithPreferences方法的block会返回错误
The text was updated successfully, but these errors were encountered: