UIView *testView = [[UIView alloc] initWithFrame:CGRectMake(20, 20, 300, 50)];
[testView.layer setMasksToBounds:true];
[testView.layer setBorderColor:[UIColor grayColor].CGColor];
[testView.layer setBorderWidth:2];
[testView.layer setCornerRadius:6];
[contentView addSubview:testView];
[testView.layer setMasksToBounds:true];
[testView.layer setBorderColor:[UIColor grayColor].CGColor];
[testView.layer setBorderWidth:2];
[testView.layer setCornerRadius:6];
[contentView addSubview:testView];