_imageView.layer.shadowColor = [UIColor blackColor].CGColor;//shadowColor陰影顏色
_imageView.layer.shadowOffset = CGSizeMake(5,5);//shadowOffset陰影偏移,x向右偏移4挽拂,y向下偏移4悴了,默認(0, -3),這個跟shadowRadius配合使用
_imageView.layer.shadowOpacity = 0.8;//陰影透明度,默認0
_imageView.layer.shadowRadius = 4;//陰影半徑锐秦,默認3
原文地址:http://blog.csdn.net/rhljiayou/article/details/10178723