美文网首页
UIView加阴影效果

UIView加阴影效果

作者: YM_1 | 来源:发表于2016-05-12 15:12 被阅读80次
_imageView.layer.shadowColor = [UIColor blackColor].CGColor;
//shadowColor阴影颜色  
 _imageView.layer.shadowOffset = CGSizeMake(4,4);
//shadowOffset阴影偏移,x向右偏移4,y向下偏移4,默认(0, -3),这个跟shadowRadius配合使用  
_imageView.layer.shadowOpacity = 0.8;
//阴影透明度,默认0      
_imageView.layer.shadowRadius = 4;
//阴影半径,默认3 
UIBezierPath path路径

参考
http://blog.csdn.net/rhljiayou/article/details/10178723

相关文章

网友评论

      本文标题:UIView加阴影效果

      本文链接:https://www.haomeiwen.com/subject/aflprttx.html