UITextBorderStyle.None:无边框
UITextBorderStyle.Line:直线边框
UITextBorderStyle.RoundedRect:圆角矩形边框
UITextBorderStyle.Bezel:边线+阴影
@H_502_23@
1
2
3
4
let
textField =
UITextField
(frame:
CGRectMake
(10,160,200,30))
//设置边框样式为圆角矩形
textField.borderStyle =
UITextBorderStyle
.
RoundedRect
self
.view.addSubview(textField)
textField.placeholder=
"请输入用户名"
|