From ee370ec97886f941da367276b5420e51850d59f3 Mon Sep 17 00:00:00 2001 From: TrueZhuanjia Date: Thu, 14 Aug 2025 01:04:10 +0800 Subject: [PATCH] iOS 12 fix: docked navigation bar tint color --- VoidLink/ViewControllers/SWRevealViewController.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/VoidLink/ViewControllers/SWRevealViewController.m b/VoidLink/ViewControllers/SWRevealViewController.m index eb08e380..7fd9b381 100755 --- a/VoidLink/ViewControllers/SWRevealViewController.m +++ b/VoidLink/ViewControllers/SWRevealViewController.m @@ -940,14 +940,15 @@ const int FrontViewPositionNone = 0xff; _dockedNavBar.standardAppearance = navBarAppearanceStandard; _dockedNavBar.scrollEdgeAppearance = navBarAppearanceStandard; } else { - _dockedNavBar.backgroundColor = [UIColor clearColor]; - _dockedNavBar.backgroundColor = [ThemeManager appBackgroundColor]; + _dockedNavBar.barTintColor = [UIColor clearColor]; + _dockedNavBar.barTintColor = [ThemeManager appBackgroundColor]; _dockedNavBar.shadowImage = [UIImage new]; // remove bottom line for navbar } // 创建导航项 - _navItem = [[UINavigationItem alloc] initWithTitle:[LocalizationHelper localizedStringForKey:@"Settings"]]; + if (@available(iOS 13.0, *)) _navItem = [[UINavigationItem alloc] initWithTitle:[LocalizationHelper localizedStringForKey:@"Settings"]]; + else _navItem = [[UINavigationItem alloc] initWithTitle:@""]; [self setupBackButton];