diff --git a/doric-cli/assets-lib/example/iOS/App/SceneDelegate.m b/doric-cli/assets-lib/example/iOS/App/SceneDelegate.m index 59d7fe3f..fc45d6bb 100644 --- a/doric-cli/assets-lib/example/iOS/App/SceneDelegate.m +++ b/doric-cli/assets-lib/example/iOS/App/SceneDelegate.m @@ -25,6 +25,12 @@ - (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session op doricViewController.navigationItem.rightBarButtonItem = rightBarItem; #endif UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:doricViewController]; + UINavigationBar *bar = navigationController.navigationBar; + if (@available(iOS 15.0, *)) { + UINavigationBarAppearance *barAppearance = [UINavigationBarAppearance new]; + barAppearance.backgroundColor = UIColor.whiteColor; + bar.scrollEdgeAppearance = bar.standardAppearance = barAppearance; + } UIWindow *window = [[UIWindow alloc] initWithWindowScene:windowScene]; window.frame = windowScene.coordinateSpace.bounds; window.rootViewController = navigationController; diff --git a/doric-cli/assets/iOS/App/SceneDelegate.m b/doric-cli/assets/iOS/App/SceneDelegate.m index 5e057088..d55da7c9 100644 --- a/doric-cli/assets/iOS/App/SceneDelegate.m +++ b/doric-cli/assets/iOS/App/SceneDelegate.m @@ -23,6 +23,12 @@ - (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session op doricViewController.navigationItem.rightBarButtonItem = rightBarItem; #endif UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:doricViewController]; + UINavigationBar *bar = navigationController.navigationBar; + if (@available(iOS 15.0, *)) { + UINavigationBarAppearance *barAppearance = [UINavigationBarAppearance new]; + barAppearance.backgroundColor = UIColor.whiteColor; + bar.scrollEdgeAppearance = bar.standardAppearance = barAppearance; + } UIWindow *window = [[UIWindow alloc] initWithWindowScene:windowScene]; window.frame = windowScene.coordinateSpace.bounds; window.rootViewController = navigationController; diff --git a/doric-iOS/Example/Example/AppDelegate.m b/doric-iOS/Example/Example/AppDelegate.m index 05514209..bdd09c36 100644 --- a/doric-iOS/Example/Example/AppDelegate.m +++ b/doric-iOS/Example/Example/AppDelegate.m @@ -47,6 +47,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( #if __has_include() [SDImageCodersManager.sharedManager addCoder:SDImageWebPCoder.sharedCoder]; #endif + UINavigationBar *bar = self.navigationController.navigationBar; + if (@available(iOS 15.0, *)) { + UINavigationBarAppearance *barAppearance = [UINavigationBarAppearance new]; + barAppearance.backgroundColor = UIColor.whiteColor; + bar.scrollEdgeAppearance = bar.standardAppearance = barAppearance; + } return YES; }