mirror of https://github.com/LIJI32/SameBoy.git
Don't apply the about screen inset on button-less iPads
This commit is contained in:
parent
8755e505d5
commit
9972ce999d
|
@ -215,6 +215,7 @@
|
||||||
- (void)viewDidLayoutSubviews
|
- (void)viewDidLayoutSubviews
|
||||||
{
|
{
|
||||||
[super viewDidLayoutSubviews];
|
[super viewDidLayoutSubviews];
|
||||||
|
if ([UIDevice currentDevice].userInterfaceIdiom != UIUserInterfaceIdiomPad) {
|
||||||
UIEdgeInsets insets = self.view.window.safeAreaInsets;
|
UIEdgeInsets insets = self.view.window.safeAreaInsets;
|
||||||
UIView *view = ((UIVisualEffectView *)self.view).contentView;
|
UIView *view = ((UIVisualEffectView *)self.view).contentView;
|
||||||
CGRect parentFrame = self.view.frame;
|
CGRect parentFrame = self.view.frame;
|
||||||
|
@ -222,6 +223,7 @@
|
||||||
0,
|
0,
|
||||||
parentFrame.size.width - insets.left - insets.right,
|
parentFrame.size.width - insets.left - insets.right,
|
||||||
parentFrame.size.height - insets.bottom);
|
parentFrame.size.height - insets.bottom);
|
||||||
|
}
|
||||||
if (self.view.frame.size.width > self.view.frame.size.height) {
|
if (self.view.frame.size.width > self.view.frame.size.height) {
|
||||||
[self layoutForHorizontalLayout];
|
[self layoutForHorizontalLayout];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue