Skip to content

Commit a6551fd

Browse files
committed
iOS 10 backward compatibility
1 parent 3b76827 commit a6551fd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/InAppSettingsKit/Controllers/IASKAppSettingsWebViewController.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ - (void)loadView {
7474
[self.view addSubview:self.webView];
7575

7676
// Create constraints to match the entire safe area layout:
77-
UILayoutGuide *safeArea = self.view.safeAreaLayoutGuide;
77+
UILayoutGuide *safeArea = self.view.layoutMarginsGuide;
78+
if (@available(iOS 11.0, *)) {
79+
safeArea = self.view.safeAreaLayoutGuide;
80+
}
7881
[NSLayoutConstraint activateConstraints:@[
7982
[self.webView.topAnchor constraintEqualToAnchor:safeArea.topAnchor],
8083
[self.webView.bottomAnchor constraintEqualToAnchor:safeArea.bottomAnchor],

0 commit comments

Comments
 (0)