This is an automated email from the ASF dual-hosted git repository. GitToTheHub pushed a commit to branch pr-refactor-CDVViewController-rename-property-statusBarBackground in repository https://gitbox.apache.org/repos/asf/cordova-ios.git
commit 83a126bcd02ec890bc595bb395843da5ebcc61de Author: Manuel Beck <[email protected]> AuthorDate: Fri Aug 28 08:43:10 2026 +0200 refactor(CDVViewController): rename `statusBarBackground` to `statusBarBackgroundView` - 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 | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m index 17695756..da65c0c8 100644 --- a/CordovaLib/Classes/Public/CDVViewController.m +++ b/CordovaLib/Classes/Public/CDVViewController.m @@ -50,7 +50,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 @@ -208,7 +208,7 @@ static UIColor *defaultBackgroundColor(void) { _statusBarBackgroundColor = color; } - [self.statusBarBackground setBackgroundColor:self.statusBarBackgroundColor]; + [self.statusBarBackgroundView setBackgroundColor:self.statusBarBackgroundColor]; [self setNeedsStatusBarAppearanceUpdate]; } @@ -216,7 +216,7 @@ static UIColor *defaultBackgroundColor(void) { { _statusBarWebViewColor = color; - [self.statusBarBackground setBackgroundColor:self.statusBarBackgroundColor]; + [self.statusBarBackgroundView setBackgroundColor:self.statusBarBackgroundColor]; [self setNeedsStatusBarAppearanceUpdate]; } @@ -366,7 +366,7 @@ static UIColor *defaultBackgroundColor(void) { } // Instantiate the status bar - if (!self.statusBarBackground) { + if (!self.statusBarBackgroundView) { [self createStatusBarView]; } @@ -388,7 +388,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]; @@ -588,7 +588,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; } @@ -598,7 +598,7 @@ static UIColor *defaultBackgroundColor(void) { // 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. - self.statusBarBackground.hidden = (scrollView.contentInsetAdjustmentBehavior == UIScrollViewContentInsetAdjustmentNever); + self.statusBarBackgroundView.hidden = (scrollView.contentInsetAdjustmentBehavior == UIScrollViewContentInsetAdjustmentNever); #endif } @@ -607,7 +607,7 @@ static UIColor *defaultBackgroundColor(void) { { // The CDVStatusBar plugin overrides this in a category extension, and // should bypass this implementation entirely - return self.statusBarBackground.alpha < 0.0001f; + return self.statusBarBackgroundView.alpha < 0.0001f; } #endif @@ -752,17 +752,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 } @@ -905,7 +905,7 @@ static UIColor *defaultBackgroundColor(void) { - (void)showStatusBar:(BOOL)visible { #if !defined(TARGET_OS_VISION) || !TARGET_OS_VISION - [self.statusBarBackground setAlpha:(visible ? 1 : 0)]; + [self.statusBarBackgroundView setAlpha:(visible ? 1 : 0)]; [self setNeedsStatusBarAppearanceUpdate]; #endif } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
