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 09:30:08 UTC
(cordova-ios) branch master updated: refactor(CDVViewController): use property dot syntax (#1713)
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 17e473ee refactor(CDVViewController): use property dot syntax (#1713)
17e473ee is described below
commit 17e473ee0f781de8f156cc3cbab947aaf039f19c
Author: Manuel Beck <ma...@outlook.de>
AuthorDate: Fri Aug 28 11:30:02 2026 +0200
refactor(CDVViewController): use property dot syntax (#1713)
- Some properties were not assigned by the dot syntax but rather by the setter method. Using the dot syntax is the standard todays.
---
CordovaLib/Classes/Public/CDVViewController.m | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m
index c6d79609..a168ea49 100644
--- a/CordovaLib/Classes/Public/CDVViewController.m
+++ b/CordovaLib/Classes/Public/CDVViewController.m
@@ -175,14 +175,14 @@ static UIColor *defaultBackgroundColor(void) {
{
_backgroundColor = color ?: defaultBackgroundColor();
- [self.webView setBackgroundColor:self.backgroundColor];
+ self.webView.backgroundColor = self.backgroundColor;
}
- (void)setSplashBackgroundColor:(UIColor *)color
{
_splashBackgroundColor = color ?: self.backgroundColor;
- [self.launchView setBackgroundColor:self.splashBackgroundColor];
+ self.launchView.backgroundColor = self.splashBackgroundColor;
}
- (UIColor *)statusBarBackgroundColor
@@ -209,7 +209,7 @@ static UIColor *defaultBackgroundColor(void) {
_statusBarBackgroundColor = color;
}
- [self.statusBarBackgroundView setBackgroundColor:self.statusBarBackgroundColor];
+ self.statusBarBackgroundView.backgroundColor = self.statusBarBackgroundColor;
[self setNeedsStatusBarAppearanceUpdate];
}
@@ -217,7 +217,7 @@ static UIColor *defaultBackgroundColor(void) {
{
_statusBarWebViewColor = color;
- [self.statusBarBackgroundView setBackgroundColor:self.statusBarBackgroundColor];
+ self.statusBarBackgroundView.backgroundColor = self.statusBarBackgroundColor;
[self setNeedsStatusBarAppearanceUpdate];
}
@@ -387,12 +387,12 @@ static UIColor *defaultBackgroundColor(void) {
[self loadStartPage];
- [self.webView setBackgroundColor:self.backgroundColor];
- [self.launchView setBackgroundColor:self.splashBackgroundColor];
- [self.statusBarBackgroundView setBackgroundColor:self.statusBarBackgroundColor];
+ self.webView.backgroundColor = self.backgroundColor;
+ self.launchView.backgroundColor = self.splashBackgroundColor;
+ self.statusBarBackgroundView.backgroundColor = self.statusBarBackgroundColor;
if (self.showInitialSplashScreen) {
- [self.launchView setAlpha:1];
+ self.launchView.alpha = 1;
}
}
@@ -700,7 +700,7 @@ static UIColor *defaultBackgroundColor(void) {
UIView* view = [[UIView alloc] initWithFrame:webViewBounds];
view.translatesAutoresizingMaskIntoConstraints = NO;
- [view setAlpha:0];
+ view.alpha = 0;
NSString* launchStoryboardName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchStoryboardName"];
if (launchStoryboardName != nil) {
@@ -899,7 +899,7 @@ static UIColor *defaultBackgroundColor(void) {
CGFloat fadeDuration = fadeSplashScreenDuration/1000;
[UIView animateWithDuration:fadeDuration animations:^{
- [self.launchView setAlpha:(visible ? 1 : 0)];
+ self.launchView.alpha = (visible ? 1 : 0);
if (!visible) {
[self.webView becomeFirstResponder];
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org