UIView圆角和白色边框 [英] UIView with round corner and white border
本文介绍了UIView圆角和白色边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
由于 UIProgressHUD
需要访问私有api,
所以我希望构建一个 UIView
圆角和白色边框。
我知道要转弯是:
Due to UIProgressHUD
need to access private api,
so I hope to construct an UIView
with round corner and white border.
I know to make the corner round is:
view.layer.cornerRadius = 5;
但如何让uiview同时具有圆角和白色边框?
But how to make the uiview has round corner and white border at the same time?
欢迎任何评论
谢谢
interdev
Thanks interdev
推荐答案
使用相同的图层对象:
view.layer.borderWidth = 1;
view.layer.borderColor = [[UIColor whiteColor] CGColor];
这篇关于UIView圆角和白色边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文