get isIPhonePortrait flag ready for release

This commit is contained in:
True Zhuanjia committed 2024-07-13 18:18:19 +08:00
1 parent 0a449c25eb
commit 837a75c477
1 file changed
+2 -6
@@ -1024,8 +1024,8 @@ static NSMutableSet* hostList;
CGFloat screenHeightInPoints = CGRectGetHeight([[UIScreen mainScreen] bounds]); CGFloat screenHeightInPoints = CGRectGetHeight([[UIScreen mainScreen] bounds]);
CGFloat screenWidthInPoints = CGRectGetWidth([[UIScreen mainScreen] bounds]); CGFloat screenWidthInPoints = CGRectGetWidth([[UIScreen mainScreen] bounds]);
bool isPortrait = screenHeightInPoints > screenWidthInPoints; bool isPortrait = screenHeightInPoints > screenWidthInPoints;
// return isIPhone && isPortrait; return isIPhone && isPortrait;
return isPortrait; // return isPortrait;
} }
- (void)viewDidLoad - (void)viewDidLoad
@@ -1047,10 +1047,6 @@ static NSMutableSet* hostList;
[self disableUpButton]; [self disableUpButton];
// Set the gesture // Set the gesture
BOOL isIPhone = ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone);
CGFloat screenHeightInPoints = CGRectGetHeight([[UIScreen mainScreen] bounds]);
CGFloat screenWidthInPoints = CGRectGetWidth([[UIScreen mainScreen] bounds]);
bool isPortrait = false;
if(![self isIPhonePortrait]) [self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer]; // to prevent buggy settings view in iphone portrait mode; if(![self isIPhonePortrait]) [self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer]; // to prevent buggy settings view in iphone portrait mode;
// Get callbacks associated with the viewController // Get callbacks associated with the viewController