I am very new to CALayer thing. I had a look at the documentation, but quite don't understand the meaning of those properties which can be used to control the shadow
shadowOpacity
shadowRadius
shadowOffset
I particularly don't understand the Offset & Radius.
Can anyone give me some lights to me, for this newbie question?
Another question about the shadow is
If the UIView view1's frame is CGRect(0, 0, 768, 40), if I apply shadow on it, will the shadow possibly be covered by another UIView which is just next to the bottom edge of view1?
thanks
The offset is how far the shadow is cast from its view. The radius is how blurry it is. You could set an offset that is zero CGSizeMake(0,0) and a radius of 5.0 and you would have an even shadow around your view.
Remember to import the QuartzCore library when trying to work with CALayers.
The shadow may be covered by views that are above it in the view heiarchy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With