solid shadow for CALayer
13,361
If you want no blurring, you can:
myLayer.shadowColor = [[UIColor greenColor] CGColor];
myLayer.shadowOffset = CGSizeMake(5.0, 5.0);
myLayer.shadowOpacity = 1.0;
myLayer.shadowRadius = 0.0;
The shadowRadius
dictates the amount of blur. shadowOffset
dictates where the shadow goes.
Author by
user1612877
Newbie to objective C and iOs programming. I seem to get less sleep recently but can't wait to learn more about coding in this language.
Updated on July 28, 2022Comments
-
user1612877 almost 2 years
I have an animated CALayer which is dropping a shadow. That is what I intended to do but I am looking for way to have a solid shadow without blur. Changing the blur radius does not save my problem. Any ideas?
Many thanks.
myLayer.shadowRadius = 3; //shadowBlurRadius myLayer.shadowColor = [[UIColor greenColor] CGColor]; //intended is to get a green solid shadow without blur