Answers for "swift iOS15 navigationbar stying broken"

0

swift iOS15 navigationbar stying broken

// Make sure you also add the scrollEdgeAppearance in >iOS15!

let backgroundColor = .yellow
let tintColor = .white

if #available(iOS 13.0, *) {
  let navBarAppearance = UINavigationBarAppearance()
  navBarAppearance.configureWithDefaultBackground()
  navBarAppearance.backgroundColor = .clear
  navBarAppearance.backgroundImage = UIImage(color: backgroundColor)

  navBarAppearance.shadowColor = nil
  self.navigationBar.standardAppearance = navBarAppearance
  self.navigationBar.compactAppearance = navBarAppearance

  // Important to add:
  self.navigationBar.scrollEdgeAppearance = navBarAppearance
}
Posted by: Guest on January-10-2022

Code answers related to "swift iOS15 navigationbar stying broken"

Code answers related to "Swift"

Browse Popular Code Answers by Language