Swift开发教程--设置圆角Button和圆角边框TextView

Posted wanglixin1999

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Swift开发教程--设置圆角Button和圆角边框TextView相关的知识,希望对你有一定的参考价值。

设置圆角Button

button.layer.borderColor = UIColor.whiteColor().CGColor;

button.layer.borderWidth = 2;

button.layer.cornerRadius = 16;


设置圆角边框TextView

inputTextView.layer.borderColor = UIColor(red: 60/255, green: 40/255, blue: 129/255, alpha: 1).CGColor;

inputTextView.layer.borderWidth = 1;

inputTextView.layer.cornerRadius = 16;


以上是关于Swift开发教程--设置圆角Button和圆角边框TextView的主要内容,如果未能解决你的问题,请参考以下文章