【发布时间】:2015-02-11 02:27:44
【问题描述】:
UILabel 设置阴影半径不起作用。
[self.testLabel.layer setShadowColor:[[UIColor purpleColor] CGColor]];
[self.testLabel.layer setShadowOffset:CGSizeMake(3, 3)];
[self.testLabel.layer setShadowRadius:5.0f];
[self.testLabel.layer setMasksToBounds:YES];
我的代码(Google 云端硬盘) https://drive.google.com/file/d/0B5UPvOBH3cqvOFlvZHhKdlNhb0E/view?usp=sharing
如果这是一个重复的问题,我很抱歉。非常感谢。
【问题讨论】:
-
亲爱的 AdrianHor,我试过了,但还是不行 X(drive.google.com/file/d/0B5UPvOBH3cqvV2dKemVxaWxPeTQ/…
-
亲爱的 AdrianHor,非常感谢。如果添加这一行,我可以看到阴影效果....self.testLabel.layer.shadowOpacity = 1.0f;