按钮边框颜色-目标C-快速

问题描述:

我想将边框颜色更改为特定的十六进制颜色(#21CE99),请大家帮帮我吗?

I want to change my border color to a specific hex color(#21CE99), can you guys please help me?

我已经知道如何将其更改为基本颜色,例如:

I've already known how to change it to a basic color, for example:

_button.layer.borderColor = [UIColor greenColor].CGColor;

但是我只需要这种颜色.

but I only need this color.

谢谢.

答案

如何设置客户快速地以编程方式显示UIView的边框颜色

_button.layer.borderColor = [UIColor colorWithRed:33.0 / 255.0 green:206.0 / 255.0 blue:153.0 / 255.0 alpha:1.0].CGColor;