如何在swift 4或xcode 9中实现此代码?
// Remove hairline between navigation bar and anything below such as search bar
UINavigationBar.appearance().shadowImage = UIImage()
我想删除navBar下划线。
答案 0 :(得分:0)
请检查:
self.navigationController?.navigationBar.shadowImage = UIImage()
答案 1 :(得分:0)
不用担心复制粘贴会起作用。
// Remove Bottom Shadow
UINavigationBar.appearance().shadowImage = UIImage()
UINavigationBar.appearance().setBackgroundImage(UIImage(), for: .default)