disable run-time theme switch

This commit is contained in:
TrueZhuanjia
2025-07-07 09:46:56 +08:00
parent 6579ea681e
commit c4bc77db05
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -481,6 +481,7 @@ static const float REFRESH_CYCLE = 2.0f;
}
- (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection {
/*
[super traitCollectionDidChange:previousTraitCollection];
if (@available(iOS 13.0, *)) {
@@ -489,7 +490,7 @@ static const float REFRESH_CYCLE = 2.0f;
}
} else {
[self updateTheme:UIUserInterfaceStyleDark];
}
}*/
}
@@ -1451,7 +1451,8 @@ static NSMutableSet* hostList;
}
- (void)viewDidLoad{
[ThemeManager setUserInterfaceStyle:UIUserInterfaceStyleUnspecified];
[ThemeManager setUserInterfaceStyle:UIScreen.mainScreen.traitCollection.userInterfaceStyle];
[super viewDidLoad];
//[OrientationHelper updateOrientationToLandscape];
// self.navigationController.delegate = self;