Skip to content

Commit 87ada79

Browse files
author
Carlos Cabanero
committed
Fixed layouts for new iPad Pro with OLED displays
1 parent d05265c commit 87ada79

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

Blink/LayoutManager.m

+18-6
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,13 @@ + (UIEdgeInsets) buildSafeInsetsForController:(UIViewController *)ctrl andMode:(
9595
result = deviceMargins;
9696
if (DeviceInfo.shared.hasCorners &&
9797
UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad) {
98-
result.top = 16;
99-
result.bottom = 16;
98+
if ([DeviceInfo.shared.marketingName containsString:@"M4"]) {
99+
result.top = 25;
100+
result.bottom = 25;
101+
} else {
102+
result.top = 16;
103+
result.bottom = 16;
104+
}
100105
}
101106

102107
break;
@@ -108,10 +113,17 @@ + (UIEdgeInsets) buildSafeInsetsForController:(UIViewController *)ctrl andMode:(
108113
}
109114

110115
if (!deviceInfo.hasNotch) {
111-
result.top = 5;
112-
result.left = 5;
113-
result.right = MAX(deviceMargins.right, 5);
114-
result.bottom = fullScreen ? 5 : 10;
116+
if ([DeviceInfo.shared.marketingName containsString:@"M4"]) {
117+
result.top = 8;
118+
result.left = 8;
119+
result.right = MAX(deviceMargins.right, 8);
120+
result.bottom = fullScreen ? 8 : 10;
121+
} else {
122+
result.top = 5;
123+
result.left = 5;
124+
result.right = MAX(deviceMargins.right, 5);
125+
result.bottom = fullScreen ? 5 : 10;
126+
}
115127
break;
116128
}
117129

0 commit comments

Comments
 (0)