删除边框后如何在swift navigationBar中添加边框 [英] How to add a border to swift navigationBar after removing it
本文介绍了删除边框后如何在swift navigationBar中添加边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用:
self.navigationController?.navigationBar.shadowImage = UIImage()
要在我的应用中早些时候删除NavigationBar的边框,但是现在我不确定在以后的屏幕上重新添加边框.
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.
推荐答案
要将navigationBar
的shadowImage
重置为默认的shadowImage
,请执行以下操作:
To reset the navigationBar
's shadowImage
to the default shadowImage
do the following:
self.navigationController?.navigationBar.shadowImage = UINavigationBar().shadowImage
这篇关于删除边框后如何在swift navigationBar中添加边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文