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