We’ve solved this as followed:

We set the background image on ViewController. This is the same as we use in navigation bar.

let imageView = UIImageView(image: .assetImage(.background))
imageView.contentMode = .topLeft
collectionView.backgroundView = imageView

Style the navigation bar.

// General Styling
UINavigationBar.appearance().tintColor = .assetColor(.navigationBarTintColor)
        
// Bar Styling
let navBarAppearance = UINavigationBarAppearance()
navBarAppearance.shadowColor = .clear
navBarAppearance.backgroundColor = UIColor(patternImage: .assetImage(.background)!)
        
UINavigationBar.appearance().standardAppearance = navBarAppearance
UINavigationBar.appearance().scrollEdgeAppearance = navBarAppearance

In addition we change the translucent of the navigation bar for non-root views:

if isRootview {
    self.navigationController?.navigationBar.isTranslucent = true
} else {
    self.navigationController?.navigationBar.isTranslucent = false
}

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top