其实弄个圆角,根本不需要加个mask,网上很多资料都是误导的.
直接上代码,
效果是四个圆角+layer阴影:
_bgView.backgroundColor = [UIColor whiteColor];
_bgView.layer.cornerRadius = 7;//圆角
_bgView.layer.shadowColor = HZColorMainBlue.CGColor;
_bgView.layer.shadowOffset = CGSizeMake(2,6);
_bgView.layer.shadowOpacity = 0.3;//阴影