Answers for "swift navigationbar not working"

0

swift navigationbar not working

// 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 navigationbar not working"

Code answers related to "Swift"

Browse Popular Code Answers by Language