Skip to content
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

Open
q858333 opened this issue Aug 23, 2022 · 6 comments
Open

iOS16 创建YYTextView后 导致旋转屏幕失败 #973

q858333 opened this issue Aug 23, 2022 · 6 comments

Comments

@q858333
Copy link

q858333 commented Aug 23, 2022

UIWindowSceneGeometryPreferencesIOS *geometryPreferences = [UIWindowSceneGeometryPreferencesIOS.alloc initWithInterfaceOrientations:1 << orientation];
[ws requestGeometryUpdateWithPreferences:geometryPreferences
errorHandler:^(NSError * _Nonnull error) {
}];

创建YYTextView后,requestGeometryUpdateWithPreferences方法的block会返回错误

@GKWenBo
Copy link

GKWenBo commented Sep 7, 2022

@q858333 你好,请问这个问题解决了吗

@teethandnail
Copy link

YYText导致ioS16不能旋转,是因为YYTextEffectWindow这个单例window导致,在合适的时机把这个window设置成隐藏可以避免这个问题

@WeeTom
Copy link

WeeTom commented Sep 23, 2022

找遍了屏幕旋转相关的代码,终于发现是这个问题。。。崩溃~有人解决了吗

@WeeTom
Copy link

WeeTom commented Sep 23, 2022

我的问题是,App在特定场景允许横屏,但是大部分情况是不允许横屏的,加入YYTextView之后,应用界面没有横屏,但是手机状态栏可以横屏了

@LatteCat
Copy link

找遍了屏幕旋转相关的代码,终于发现是这个问题。。。崩溃~有人解决了吗

参考上面 @teethandnail 那位兄弟的解决方案啊

@DGKall
Copy link

DGKall commented Aug 21, 2024

可以试着在进入业务前,找个地方初始化一个yytextview 临时变量,走一遍生命周期

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants