From a7d98fb2f6b7969f5565b375fd3542b7c1f40cf1 Mon Sep 17 00:00:00 2001 From: zeng Date: Fri, 25 Apr 2025 10:41:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=A0=8F=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Thimra.xcodeproj/project.pbxproj | 6 ++++-- .../Base/Controller/SPNavigationController.swift | 9 +++++++++ .../Extension/UINavigationController+SPAdd.swift | 14 +++++++------- Thimra/Source/Info.plist | 2 ++ 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/Thimra.xcodeproj/project.pbxproj b/Thimra.xcodeproj/project.pbxproj index 96925a4..29db02f 100644 --- a/Thimra.xcodeproj/project.pbxproj +++ b/Thimra.xcodeproj/project.pbxproj @@ -225,10 +225,11 @@ INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UIMainStoryboardFile = ""; - INFOPLIST_KEY_UIStatusBarHidden = YES; + INFOPLIST_KEY_UIStatusBarHidden = NO; INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent; INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; + INFOPLIST_KEY_UIUserInterfaceStyle = Light; IPHONEOS_DEPLOYMENT_TARGET = 15.6; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -266,10 +267,11 @@ INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UIMainStoryboardFile = ""; - INFOPLIST_KEY_UIStatusBarHidden = YES; + INFOPLIST_KEY_UIStatusBarHidden = NO; INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent; INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; + INFOPLIST_KEY_UIUserInterfaceStyle = Light; IPHONEOS_DEPLOYMENT_TARGET = 15.6; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/Thimra/Base/Controller/SPNavigationController.swift b/Thimra/Base/Controller/SPNavigationController.swift index a9f91eb..6d4911a 100644 --- a/Thimra/Base/Controller/SPNavigationController.swift +++ b/Thimra/Base/Controller/SPNavigationController.swift @@ -33,5 +33,14 @@ class SPNavigationController: UINavigationController { } super.setViewControllers(viewControllers, animated: animated) } + + //MARK:-------------- 状态栏样式 -------------- + override var childForStatusBarStyle: UIViewController? { + return self.topViewController + } + + override var childForStatusBarHidden: UIViewController? { + return self.topViewController + } } diff --git a/Thimra/Base/Extension/UINavigationController+SPAdd.swift b/Thimra/Base/Extension/UINavigationController+SPAdd.swift index 5220bd7..e2b6448 100644 --- a/Thimra/Base/Extension/UINavigationController+SPAdd.swift +++ b/Thimra/Base/Extension/UINavigationController+SPAdd.swift @@ -19,12 +19,12 @@ extension UINavigationController { self.setViewControllers(viewControllers, animated: animated) } - //MARK:-------------- 状态栏样式 -------------- - open override var childForStatusBarStyle: UIViewController? { - return self.topViewController - } - open override var childForStatusBarHidden: UIViewController? { - return self.topViewController - } +// //MARK:-------------- 状态栏样式 -------------- +// open override var childForStatusBarStyle: UIViewController? { +// return self.topViewController +// } +// open override var childForStatusBarHidden: UIViewController? { +// return self.topViewController +// } } diff --git a/Thimra/Source/Info.plist b/Thimra/Source/Info.plist index 7c5f0be..cdc4d2e 100644 --- a/Thimra/Source/Info.plist +++ b/Thimra/Source/Info.plist @@ -21,5 +21,7 @@ + UIViewControllerBasedStatusBarAppearance +