如何删除UINavigationBar的边框底部? [英] How can I remove border bottom of UINavigationBar?

查看:102
本文介绍了如何删除UINavigationBar的边框底部?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从UINavigationBar删除底部边框,但是我不知道如何删除它.

I want to remove the bottom border from UINavigationBar, but I don't know how to remove it.

推荐答案

实际上,这就是导航栏的阴影.

Actually, that is the shadow of the navigation bar.

要摆脱它,只需将其设置为空图像:

To get rid of it, just set it to an empty image:

navigationController.navigationBar.shadowImage = UIImage()

注意:您必须将其设置为空的UIImage()nil由于某些原因无法正常工作.

Note: You must set it to an empty UIImage(); nil won't work for some reason.

这篇关于如何删除UINavigationBar的边框底部?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆