From 162f372d60068c1fcf9becff20890500911ef05b Mon Sep 17 00:00:00 2001 From: Innei Date: Mon, 3 Mar 2025 16:50:16 +0800 Subject: [PATCH] feat(mobile): enhance UI tint color configuration Signed-off-by: Innei --- apps/mobile/scripts/with-follow-app-delegate.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/apps/mobile/scripts/with-follow-app-delegate.js b/apps/mobile/scripts/with-follow-app-delegate.js index 99513f5b0..5640de3cf 100644 --- a/apps/mobile/scripts/with-follow-app-delegate.js +++ b/apps/mobile/scripts/with-follow-app-delegate.js @@ -9,15 +9,13 @@ const withFollowAppDelegate = (config) => { src: newContents, anchor: "// You can add your custom initial props in the dictionary below.", newSrc: ` - [UIView appearanceWhenContainedInInstancesOfClasses:@[[UIAlertController class]]].tintColor = - [UIColor colorWithRed:255.0/255.0 - green:92.0/255.0 - blue:0.0/255.0 - alpha:1.0]; - self.window.tintColor = [UIColor colorWithRed:255.0/255.0 - green:92.0/255.0 - blue:0.0/255.0 - alpha:1.0]; + UIColor* tintColor = [UIColor colorWithRed:255.0/255.0 green:92.0/255.0 blue:0.0/255.0 alpha:1.0]; + [UIView appearanceWhenContainedInInstancesOfClasses:@[[UIAlertController class]]].tintColor = tintColor; + self.window.tintColor = tintColor; + + [[UIButton appearance] setTintColor:tintColor]; + [[UISwitch appearance] setOnTintColor:tintColor]; + [[UIView appearance] setTintColor:tintColor]; `, offset: 3, tag: "custom tint color",