You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/04/21 13:47:42 UTC

[GitHub] [cordova-plugin-screen-orientation] Hanzofm edited a comment on issue #80: Wrong lock/unlock orientation behaviour on iOS Devices

Hanzofm edited a comment on issue #80:
URL: https://github.com/apache/cordova-plugin-screen-orientation/issues/80#issuecomment-824074907


   The problem has a relationship with the code of CDVOrientation.m file:
   
   `  if (_lastOrientation != UIInterfaceOrientationUnknown) {
                       [[UIDevice currentDevice] setValue:[NSNumber numberWithInt:_lastOrientation] forKey:@"orientation"]; 
                       ((void (*)(CDVViewController*, SEL, NSMutableArray*))objc_msgSend)(vc,selector,result);
                       [UINavigationController attemptRotationToDeviceOrientation];
                   }`
   
   If comment the line:
   
   `[[UIDevice currentDevice] setValue:[NSNumber numberWithInt:_lastOrientation] forKey:@"orientation"]`
   
   The problem disappears.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org