Skip to content

Commit a18a825

Browse files
committed
Use screen bounds instead of adjusted view bounds
1 parent 9ddd75f commit a18a825

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

ECSlidingViewController/Vendor/ECSlidingViewController/ECSlidingViewController.m

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,16 @@ - (CGRect)fullViewBounds
531531
statusBarHeight = [UIApplication sharedApplication].statusBarFrame.size.width;
532532
}
533533
}
534-
CGRect bounds = self.view.bounds;
534+
535+
CGRect bounds = [UIScreen mainScreen].bounds;
536+
537+
if (UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) {
538+
CGFloat height = bounds.size.width;
539+
CGFloat width = bounds.size.height;
540+
bounds.size.height = height;
541+
bounds.size.width = width;
542+
}
543+
535544
bounds.origin.y += statusBarHeight;
536545
bounds.size.height -= statusBarHeight;
537546

0 commit comments

Comments
 (0)