You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2026/02/20 11:58:52 UTC

(cordova-plugin-inappbrowser) branch pr-ios-resolve-variable-safeArea created (now 2aeff39)

This is an automated email from the ASF dual-hosted git repository.

manuelbeck pushed a change to branch pr-ios-resolve-variable-safeArea
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-inappbrowser.git


      at 2aeff39  chore(ios): resolve variable `safeArea`

This branch includes the following new commits:

     new 2aeff39  chore(ios): resolve variable `safeArea`

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


(cordova-plugin-inappbrowser) 01/01: chore(ios): resolve variable `safeArea`

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

manuelbeck pushed a commit to branch pr-ios-resolve-variable-safeArea
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-inappbrowser.git

commit 2aeff39b60b3e3c872c074aeb8c9c99fc7275733
Author: Manuel Beck <ma...@outlook.de>
AuthorDate: Fri Feb 20 12:58:43 2026 +0100

    chore(ios): resolve variable `safeArea`
    
    - Use `self.view.safeAreaLayoutGuide` directly
---
 src/ios/CDVWKInAppBrowser.m | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/ios/CDVWKInAppBrowser.m b/src/ios/CDVWKInAppBrowser.m
index d487cc3..05c0d95 100644
--- a/src/ios/CDVWKInAppBrowser.m
+++ b/src/ios/CDVWKInAppBrowser.m
@@ -867,7 +867,6 @@ BOOL isExiting = NO;
 
     // Define vertical constraints, in order from top to bottom
     // The address label and toolbar are optional
-    UILayoutGuide *safeArea = self.view.safeAreaLayoutGuide;
     BOOL toolbarIsAtTop = [_browserOptions.toolbarposition isEqualToString:kInAppBrowserToolbarBarPositionTop];
     BOOL toolbarVisible = _browserOptions.toolbar;
     BOOL addressLabelVisible = _browserOptions.location;
@@ -881,21 +880,21 @@ BOOL isExiting = NO;
         // Toolbar visible
         if (toolbarVisible) {
             // Toolbar top to safe area top
-            [self.toolbar.topAnchor constraintEqualToAnchor:safeArea.topAnchor].active = YES;
+            [self.toolbar.topAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor].active = YES;
             // Webview top to toolbar bottom
             [self.webView.topAnchor constraintEqualToAnchor:self.toolbar.bottomAnchor].active = YES;
 
             // Toolbar not visible
         } else {
             // Webview top to safe area top
-            [self.webView.topAnchor constraintEqualToAnchor:safeArea.topAnchor].active = YES;
+            [self.webView.topAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor].active = YES;
         }
 
         if (addressLabelVisible) {
             // Address label top to WebView bottom
             [self.addressLabel.topAnchor constraintEqualToAnchor:self.webView.bottomAnchor].active = YES;
             // Address label bottom to safe area bottom
-            [self.addressLabel.bottomAnchor constraintEqualToAnchor:safeArea.bottomAnchor].active = YES;
+            [self.addressLabel.bottomAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.bottomAnchor].active = YES;
 
             // Address label hidden
         } else {
@@ -906,7 +905,7 @@ BOOL isExiting = NO;
         // Toolbar can be at bottom
     } else {
         // WebView top to safe area top
-        [self.webView.topAnchor constraintEqualToAnchor:safeArea.topAnchor].active = YES;
+        [self.webView.topAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor].active = YES;
 
         if (addressLabelVisible) {
             // WebView bottom to address label top
@@ -918,7 +917,7 @@ BOOL isExiting = NO;
 
                // Address label bottom to safe area bottom
             } else {
-                [self.addressLabel.bottomAnchor constraintEqualToAnchor:safeArea.bottomAnchor].active = YES;
+                [self.addressLabel.bottomAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.bottomAnchor].active = YES;
             }
 
             // Address label hidden
@@ -935,7 +934,7 @@ BOOL isExiting = NO;
 
         // Toolbar bottom to safe area bottom
         if (toolbarVisible) {
-            [self.toolbar.bottomAnchor constraintEqualToAnchor:safeArea.bottomAnchor].active = YES;
+            [self.toolbar.bottomAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.bottomAnchor].active = YES;
         }
     }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org