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];
发表回复