ios - 自定义导航栏有一个分隔线

标签 ios swift ios11

我在我的 UIViewController 中添加了一个自定义 UINavigationBar 约束顶部、尾部、前导 = 0 和高度 = 64。在 IOS 11 中,它显示了一个分隔线UINavigationBar

Click here for ScreenShot

最佳答案

试试下面的代码

UINavigationBar.appearance().shadowImage = UIImage()
UINavigationBar.appearance().setBackgroundImage(UIImage(), for: .default)

关于ios - 自定义导航栏有一个分隔线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46604119/

相关文章:

ios - 导航 Controller 大标题,在推回 Controller 时带有搜索 Controller 故障

iOS7 不加载高度超过 1950px 的 css 图像

ios - 在 UIView 上上下滑动工作但 ScrollView 阻碍它快速?

ios - 从 AVPlayer 移除观察者时,应用程序有时会崩溃

ios - 以编程方式呈现新的 ViewController [Swift 3]

ios - 如何在 Swift 中取消正在进行的 HTTP 请求?

ios - 位置服务在 iOS 11 中不起作用

ios - 将 MKAnnotation 数组转换为集合

ios - 如何在 mapView 上禁用手势(锁定 - 不移动/平移/缩放) - 这里映射 ios sdk/swift 3?

swift - 如何删除 iOS 11 上 UISearchController 下的行?