self.layer.shadowOffset = CGSizeMake(0, 2);
self.layer.shadowColor = [UIColor blackColor].CGColor;
self.layer.shadowOpacity = 0.9;
self.layer.shadowRadius = 4;
self.layer.masksToBounds = NO;
需要加上最后一句,阴影才能显示出来
self.layer.shadowOffset = CGSizeMake(0, 2);
self.layer.shadowColor = [UIColor blackColor].CGColor;
self.layer.shadowOpacity = 0.9;
self.layer.shadowRadius = 4;
self.layer.masksToBounds = NO;
需要加上最后一句,阴影才能显示出来
本文标题:collectionViewCell添加阴影
本文链接:https://www.haomeiwen.com/subject/mzpthxtx.html
网友评论