iOS uiview 简单加阴影

2016-08-17  本文已影响43人  白牛桑

UIView *containerView = [[UIView alloc] initWithFrame:CGRectMake(20, 20, 280, 300)];

//    [containerView.layer setCornerRadius:5];

containerView.backgroundColor = [UIColor greenColor];

containerView.layer.shadowOffset = CGSizeMake(0, 2);

containerView.layer.shadowOpacity = 0.80;

[self.view addSubview:containerView];

上一篇 下一篇

猜你喜欢

热点阅读