开发者

Adding shadow is UILabel Error

开发者 https://www.devze.com 2023-03-08 04:01 出处:网络
I have UILabel showtext and I have written code like showtext.layer.shadowOpticity = 1.0; showtext.layer.shadowRadius = 0.0;

I have UILabel showtext and I have written code like

showtext.layer.shadowOpticity = 1.0;
showtext.layer.shadowRadius = 0.0;
showtext.layer.shadowColor = [UIColor blackColor].CGColor;
showtext.layer.shadowOffset = CGSizeMake(开发者_开发百科0.01,1.0);

And it's showing error "Accessing unknown "showOpticity" component of property".

Can anyone please help??


You need to add the QuartzCore.framework to the project and then #import <QuartzCore/QuartzCore.h> in the .pch file.


shadowOpticity should be shadowOpacity

0

精彩评论

暂无评论...
验证码 换一张
取 消