How to add a border to swift navigationBar after removing it

爱⌒轻易说出口 提交于 2019-12-25 01:37:46

问题


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


来源:https://stackoverflow.com/questions/57401651/how-to-add-a-border-to-swift-navigationbar-after-removing-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!