iOS圆角阴影共存

  • 内容
  • 评论
  • 相关
1
2
3
4
5
6
7
8
9
10
CGRect fixframe = weakSelf.infoBackImageView.bounds;
subLayer.frame= fixframe;
subLayer.cornerRadius=10;
subLayer.backgroundColor=[UIColor whiteColor].CGColor;
subLayer.masksToBounds=NO;
subLayer.shadowColor = [UIColor qmui_colorWithHexString:@"#EBEBEB"].CGColor;//shadowColor阴影颜色
subLayer.shadowOffset = CGSizeMake(3,2);//shadowOffset阴影偏移,x向右偏移3,y向下偏移2,默认(0, -3),这个跟shadowRadius配合使用
subLayer.shadowOpacity = 0.8;//阴影透明度,默认0
subLayer.shadowRadius = 4;//阴影半径,默认3
[weakSelf.infoBackImageView.layer insertSublayer:subLayer atIndex:0];

评论

0条评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注