iOS - UIView边框底宽? [英] iOS - UIView border-bottom-width?

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

问题描述

我知道如何设置边框& UIView 的边框宽度。

I know how to set the border & border-width for a UIView.

#import <QuartzCore/QuartzCore.h>
...
view.layer.borderColor = [UIColor redColor].CGColor;
view.layer.borderWidth = 3.0f;

如何指定仅为 border-bottom设置完全相同的属性?就像在CSS中我们有 border-bottom-width 等...

How do I specify to set the exact same property only for border-bottom? like in CSS we have border-bottom-width etc...

推荐答案

<我已经检查了UIView及其层的类引用,但是无法通过操作系统给出的方法找到任何方法。
您可以制作1(或2/3,无论你想要的)像素高视图,它可以粘在主视图的底部。

I have checked the Class Reference of the UIView and its layer, but could not find any way to do this with the means given by the os. You could make a 1(or 2/3 whatever you want) pixel high view that sticks to the bottom of the main view.

这篇关于iOS - UIView边框底宽?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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