Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 

README.md

Swift3 iOS Transparent UINavigationBar Example

There are probably a number of ways to do this, but one simple way to make a navbar transparent is to add the following code to each view controller:

    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        if let nav = self.navigationController?.navigationBar {
            nav.setBackgroundImage(UIImage(), for: .default)
            nav.shadowImage = UIImage()
            nav.isTranslucent = true
        }
    }

The result should look like this (two color background is to illustrate the transparency):

Example

About

Swift3 iOS example of making a UINavigationBar transparent

Resources

Releases

No releases published

Languages

You can’t perform that action at this time.