try to fix iPhone host view landscape lock
This commit is contained in:
1 parent
e0a81dbd34
commit
ac44efbbbe
1 file changed
+1
-1
@@ -625,6 +625,7 @@ const int FrontViewPositionNone = 0xff;
|
|||||||
|
|
||||||
- (void)_initDefaultProperties
|
- (void)_initDefaultProperties
|
||||||
{
|
{
|
||||||
|
_mainFrameIsInHostView = true;
|
||||||
_frontViewPosition = FrontViewPositionLeft;
|
_frontViewPosition = FrontViewPositionLeft;
|
||||||
_rearViewPosition = FrontViewPositionLeft;
|
_rearViewPosition = FrontViewPositionLeft;
|
||||||
_rightViewPosition = FrontViewPositionLeft;
|
_rightViewPosition = FrontViewPositionLeft;
|
||||||
@@ -736,7 +737,6 @@ const int FrontViewPositionNone = 0xff;
|
|||||||
// tested on iOS17. this method does not call back on iOS14, runtime orientation limitation not working for iOS14. Probably depends on iOS16 or higher.
|
// tested on iOS17. this method does not call back on iOS14, runtime orientation limitation not working for iOS14. Probably depends on iOS16 or higher.
|
||||||
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
|
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
|
||||||
// Return the supported interface orientations acoordingly
|
// Return the supported interface orientations acoordingly
|
||||||
|
|
||||||
if(self.mainFrameIsInHostView){
|
if(self.mainFrameIsInHostView){
|
||||||
if([self isIphone]) return UIInterfaceOrientationMaskLandscape; //always try to lock orientaion to landscape in mainFrameView in order to prevent bug.
|
if([self isIphone]) return UIInterfaceOrientationMaskLandscape; //always try to lock orientaion to landscape in mainFrameView in order to prevent bug.
|
||||||
else return [self getCurrentOrientation]; //always try to lock current orientaion in mainFrameView for iPad in order to prevent bug.
|
else return [self getCurrentOrientation]; //always try to lock current orientaion in mainFrameView for iPad in order to prevent bug.
|
||||||
|
|||||||
Reference in new issue
Block a user