UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 64)];iview
[self.view addSubview:view];ui
[view setBackgroundColor:[UIColor whiteColor]];spa
//设置uiview 的边框宽度
3d
view.layer.borderWidth = 1;orm
//设置uiview 的边框颜色
it
view.layer.borderColor = [[UIColor colorWithRed:0 green:255/255.0f blue:0 alpha:1] CGColor];margin
//设置圆角
top
UITextField *field = [[UITextField alloc] init];di
//设置边框风格
view
[field setBorderStyle:UITextBorderStyleRoundedRect];
//设置边框宽度
field.layer.borderWidth = 1;
//设置边框颜色
field.layer.borderColor=[[UIColor blueColor] CGColor];
//设置圆角弧度
field.layer.cornerRadius = 3;