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

GitToTheHub pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-ios.git


The following commit(s) were added to refs/heads/master by this push:
     new 2df10328 doc(CDVViewController): document 
`scrollViewDidChangeAdjustedContentInset:` (#1699)
2df10328 is described below

commit 2df1032870c5a57c91dd388ce7717947ac9ec64c
Author: Manuel Beck <[email protected]>
AuthorDate: Wed Aug 26 11:18:22 2026 +0200

    doc(CDVViewController): document `scrollViewDidChangeAdjustedContentInset:` 
(#1699)
    
    - Make clear that this is called when `viewport-fit` is changed
---
 CordovaLib/Classes/Public/CDVViewController.m | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/CordovaLib/Classes/Public/CDVViewController.m 
b/CordovaLib/Classes/Public/CDVViewController.m
index 8cfda9ff..2b459b92 100644
--- a/CordovaLib/Classes/Public/CDVViewController.m
+++ b/CordovaLib/Classes/Public/CDVViewController.m
@@ -578,6 +578,10 @@ static UIColor *defaultBackgroundColor(void) {
     }
 }
 
+/**
+ * We use this delegate method on the web view's scrollView to detect when the 
safe area insets are changed
+ * by the viewport-fit value.
+ */
 - (void)scrollViewDidChangeAdjustedContentInset:(UIScrollView *)scrollView
 {
 #if !defined(TARGET_OS_VISION) || !TARGET_OS_VISION
@@ -586,6 +590,9 @@ static UIColor *defaultBackgroundColor(void) {
         return;
     }
 
+    // Detect changes on viewport-fit:
+    // viewport-fit=cover causes the contentInsetAdjustmentBehavior to be 
UIScrollViewContentInsetAdjustmentNever
+    //
     // On Mac Catalyst, Cordova may manually constrain the web view below the 
title bar.
     // In that case automatic scroll-view inset adjustment is disabled, so the 
synthetic
     // status bar view should be hidden.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to