-->

How to add a border to swift navigationBar after r

2019-08-17 08:26发布

问题:

I use:

self.navigationController?.navigationBar.shadowImage = UIImage()

to remove the border of a navigationBar earlier in my app but now I'm not sure to add the border back on a later screen.

回答1:

To reset the navigationBar's shadowImage to the default shadowImage do the following:

self.navigationController?.navigationBar.shadowImage = UINavigationBar().shadowImage