UIView *view1 = [[UIView alloc]initWithFrame:CGRectMake(50, 50, 100, 100)];
view1.backgroundColor = [UIColor colorWithRed:220/255.0 green:147/255.0 blue:50/255.0 alpha:1];
//边框
view1.layer.borderColor = [UIColor blackColor].CGColor;//边框颜色
view1.layer.borderWidth = 0.3;//边框宽度
//阴影
view1.layer.shadowColor = [UIColor redColor].CGColor;//阴影颜色
view1.layer.shadowOffset = CGSizeMake(2.0, 0.0);//阴影位置
view1.layer.shadowOpacity = 1;//不透明度
view1.layer.shadowRadius = 0;//半径
view1.layer.cornerRadius = 30.0;//圆角
[self.view addSubview:view1];