UINavigationBar圆满两个角落 [英] UINavigationBar Rounded Two Corners

查看:141
本文介绍了UINavigationBar圆满两个角落的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想围绕UINavigationBar的右上角和左上角。

I want to round the top right and top left of the UINavigationBar.

我知道有改变视角半径的功能,但是有可能做一些类似于标准的UINavigationBar?

I know that there are functions for changing the views corner radius, but is it possible to do something similar to the standard UINavigationBar?

如果你不知道我在说什么,请看看:

If you don't know what I'm talking about, check out this:

谢谢!

推荐答案

最好的方法是覆盖UINavigationBar中的drawRect并使用自定义图像。

The best way is to override drawRect in UINavigationBar and use a custom image.

这篇关于UINavigationBar圆满两个角落的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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