- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor=[UIColor whiteColor];
UIView * viewTest=[[UIView alloc] initWithFrame:CGRectMake(50, 50, 200, 200)];
viewTest.backgroundColor=[UIColor lightGrayColor];
//UIView设置阴影
[[viewTest layer] setShadowOffset:CGSizeMake(1, 1)];
[[viewTest layer] setShadowRadius:5];
[[viewTest layer] setShadowOpacity:1];
[[viewTest layer] setShadowColor:[UIColor blackColor].CGColor];
//UIView设置边框
[[viewTest layer] setCornerRadius:5];
[[viewTest layer] setBorderWidth:2];
[[viewTest layer] setBorderColor:[UIColor whiteColor].CGColor];
[self.view addSubview:viewTest];
}
[super viewDidLoad];
self.view.backgroundColor=[UIColor whiteColor];
UIView * viewTest=[[UIView alloc] initWithFrame:CGRectMake(50, 50, 200, 200)];
viewTest.backgroundColor=[UIColor lightGrayColor];
//UIView设置阴影
[[viewTest layer] setShadowOffset:CGSizeMake(1, 1)];
[[viewTest layer] setShadowRadius:5];
[[viewTest layer] setShadowOpacity:1];
[[viewTest layer] setShadowColor:[UIColor blackColor].CGColor];
//UIView设置边框
[[viewTest layer] setCornerRadius:5];
[[viewTest layer] setBorderWidth:2];
[[viewTest layer] setBorderColor:[UIColor whiteColor].CGColor];
[self.view addSubview:viewTest];
}