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/08/28 08:17:08 UTC

(cordova-ios) branch master updated: refactor(CDVViewController): rename `statusBarBackground` to `statusBarBackgroundView` (#1712)

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 c627a6d3 refactor(CDVViewController): rename `statusBarBackground` to `statusBarBackgroundView` (#1712)
c627a6d3 is described below

commit c627a6d3439352e609222b06ef79671348f25916
Author: Manuel Beck <ma...@outlook.de>
AuthorDate: Fri Aug 28 10:17:02 2026 +0200

    refactor(CDVViewController): rename `statusBarBackground` to `statusBarBackgroundView` (#1712)
    
    - Make clear that this variable is about a view. Like it is for `launchView` or `webView`. This also makes it conform with PR #1711 where the initialize method for `statusBarBackgroundView` is renamed to `createStatusBarBackgroundView`.
---
 CordovaLib/Classes/Public/CDVViewController.m | 32 +++++++++++++--------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m
index 34321208..c6d79609 100644
--- a/CordovaLib/Classes/Public/CDVViewController.m
+++ b/CordovaLib/Classes/Public/CDVViewController.m
@@ -51,7 +51,7 @@ static UIColor *defaultBackgroundColor(void) {
 
 @property (nonatomic, readwrite, strong) NSMutableArray* startupPluginNames;
 @property (nonatomic, readwrite, strong) UIView *launchView;
-@property (nonatomic, readwrite, strong) UIView *statusBarBackground;
+@property (nonatomic, readwrite, strong) UIView *statusBarBackgroundView;
 @property (readwrite, assign) BOOL initialized;
 
 @end
@@ -209,7 +209,7 @@ static UIColor *defaultBackgroundColor(void) {
         _statusBarBackgroundColor = color;
     }
 
-    [self.statusBarBackground setBackgroundColor:self.statusBarBackgroundColor];
+    [self.statusBarBackgroundView setBackgroundColor:self.statusBarBackgroundColor];
     [self setNeedsStatusBarAppearanceUpdate];
 }
 
@@ -217,7 +217,7 @@ static UIColor *defaultBackgroundColor(void) {
 {
     _statusBarWebViewColor = color;
 
-    [self.statusBarBackground setBackgroundColor:self.statusBarBackgroundColor];
+    [self.statusBarBackgroundView setBackgroundColor:self.statusBarBackgroundColor];
     [self setNeedsStatusBarAppearanceUpdate];
 }
 
@@ -367,7 +367,7 @@ static UIColor *defaultBackgroundColor(void) {
     }
 
     // Instantiate the status bar
-    if (!self.statusBarBackground) {
+    if (!self.statusBarBackgroundView) {
         [self createStatusBarBackgroundView];
     }
 
@@ -389,7 +389,7 @@ static UIColor *defaultBackgroundColor(void) {
 
     [self.webView setBackgroundColor:self.backgroundColor];
     [self.launchView setBackgroundColor:self.splashBackgroundColor];
-    [self.statusBarBackground setBackgroundColor:self.statusBarBackgroundColor];
+    [self.statusBarBackgroundView setBackgroundColor:self.statusBarBackgroundColor];
 
     if (self.showInitialSplashScreen) {
         [self.launchView setAlpha:1];
@@ -589,7 +589,7 @@ static UIColor *defaultBackgroundColor(void) {
 {
 #if !defined(TARGET_OS_VISION) || !TARGET_OS_VISION
     if (self.webView.hidden) {
-        self.statusBarBackground.hidden = true;
+        self.statusBarBackgroundView.hidden = true;
         return;
     }
 
@@ -600,9 +600,9 @@ static UIColor *defaultBackgroundColor(void) {
     // In that case automatic scroll-view inset adjustment is disabled, so the synthetic
     // status bar view should be hidden.
     if (_statusBarHidden) {
-        self.statusBarBackground.hidden = true;
+        self.statusBarBackgroundView.hidden = true;
     } else {
-        self.statusBarBackground.hidden = (scrollView.contentInsetAdjustmentBehavior == UIScrollViewContentInsetAdjustmentNever);
+        self.statusBarBackgroundView.hidden = (scrollView.contentInsetAdjustmentBehavior == UIScrollViewContentInsetAdjustmentNever);
     }
 #endif
 }
@@ -757,17 +757,17 @@ static UIColor *defaultBackgroundColor(void) {
     if (NSClassFromString(@"CDVStatusBar") != nil)
         return;
 
-    self.statusBarBackground = [[UIView alloc] init];
-    self.statusBarBackground.translatesAutoresizingMaskIntoConstraints = NO;
+    self.statusBarBackgroundView = [[UIView alloc] init];
+    self.statusBarBackgroundView.translatesAutoresizingMaskIntoConstraints = NO;
 
-    [self.view addSubview:self.statusBarBackground];
+    [self.view addSubview:self.statusBarBackgroundView];
 
-    [self.statusBarBackground.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor].active = YES;
-    [self.statusBarBackground.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor].active = YES;
-    [self.statusBarBackground.topAnchor constraintEqualToAnchor:self.view.topAnchor].active = YES;
-    [self.statusBarBackground.bottomAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor].active = YES;
+    [self.statusBarBackgroundView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor].active = YES;
+    [self.statusBarBackgroundView.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor].active = YES;
+    [self.statusBarBackgroundView.topAnchor constraintEqualToAnchor:self.view.topAnchor].active = YES;
+    [self.statusBarBackgroundView.bottomAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor].active = YES;
 
-    self.statusBarBackground.hidden = YES;
+    self.statusBarBackgroundView.hidden = YES;
 #endif
 }
 


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