Post

Replies

Boosts

Views

Activity

Reply to iOS15 NavigationBar background
in viewWillApper: if (@available(iOS 15.0, *)){         UINavigationBarAppearance *appearance = [UINavigationBarAppearance new];         [appearance configureWithOpaqueBackground]; //        appearance.backgroundImage = [UIImage imageWithColor:[UIColor clearColor]];         appearance.backgroundColor = [UIColor clearColor]; // //        appearance.backgroundEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];         appearance.shadowColor = [UIColor clearColor];         appearance.titleTextAttributes = @{NSForegroundColorAttributeName:yourFontColor_3,NSFontAttributeName: [UIFont systemFontOfSize:18]};         for (UIView *subView in self.navigationController.navigationBar.subviews) { //Set as needed             subView.backgroundColor = [UIColor clearColor];         }         self.navigationController.navigationBar.scrollEdgeAppearance = appearance;         self.navigationController.navigationBar.standardAppearance = appearance;     } in wiewWilDisappear:     [self.navigationController.navigationBar setBackgroundImage:NavBacgroundImage forBarMetrics:UIBarMetricsDefault]; or if (@available(iOS 15.0, *)){         UINavigationBarAppearance *appearance = [UINavigationBarAppearance new];         appearance.backgroundImage = NavBacgroundImage;         appearance.titleTextAttributes = @{NSForegroundColorAttributeName:[UIColor whiteColor]};         self.navigationController.navigationBar.scrollEdgeAppearance = appearance;         self.navigationController.navigationBar.standardAppearance = appearance;     }
Oct ’21