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
"_lockWindow.rootViewController = _screenshotViewController" is set too early #1480
Comments
I have made a test, unfortunately it still have issue. Here following what I fixed code, you can reference. @implementation SDLLockScreenPresenter
|
Hi @84798012, are you sure that you used the PR and branch I mentioned? Several of your suggested changes were already implemented. If you did use that branch and it's not working, I must unfortunately ask for you to create either (1) a PR yourself, or (2) a test project that reproduces your issue so that I can test if my code changes are fixing your issue. (2) is preferred. Without that, I am unable to figure out what you're doing in your code that's causing your issue and I am unable to fix it. I will wait for your response, thank you! |
@joeljfischer |
@84798012 Thank you for creating the example app. However, in my testing with it I am not seeing any rotation. Was there supposed to be rotation? It appears that you modified the Obj-C example, so I ran that. I attempted to rotate, but nothing occurred. I then activated the lock screen and attempted to rotate, and nothing occurred. Could you please list out clearly the steps to see the bug you have reported in the example project you have sent? |
@joeljfischer first, make sure your iphone enabled rotate. second, you just need in iAP page tap connect, then rotate your iphone, you will see that a rotation bar on the bellow. |
I did all of that and it did not rotate. I can triple check tomorrow if you’d like, but there must be a difference in something here. |
I double check the project I uploaded, it can reproduce, please see the details on that links comments. And is it from 1483 code branch that I uploaded file? |
I upload a video how reproduce it. |
seems this issue been fixed, thanks. |
fixed, so close it. |
I have test on 1509, the issue fixed. Thanks! |
_lockWindow.rootViewController = _screenshotViewController
this line code set too early, it caused our app UIWindow(should not be can rotated) changed to be can rotated.
Root cause from the code:
(UIInterfaceOrientationMask)supportedInterfaceOrientations {
if (self.currentAppWindow == nil) {
return UIInterfaceOrientationMaskAll;
}
(BOOL)shouldAutorotate {
if (self.currentAppWindow == nil) {
return YES;
}
Suggetion to fix :
only when present viewcontroller, set the value.
when dissmiss, _lockWindow.rootViewController = nil.
The text was updated successfully, but these errors were encountered: