Question I'm struggling on. I've searched SO for a fair good time by now, but couldn't find an answer.
I have a UIView
which contains alpha value of 0.5
, means - it transparent
.
If I'm applying the usual code for UIView
shadowing -
class func applyShadow(view : UIView)
{
view.layer.shadowColor = UIColor.blackColor().colorWithAlphaComponent(0.15).CGColor
view.layer.shadowOpacity = 1
view.layer.shadowOffset = CGSizeMake(0, 0.5)
view.layer.shadowRadius = 1.3
view.layer.masksToBounds = false
view.layer.shouldRasterize = true
view.layer.rasterizationScale = UIScreen.mainScreen().scale
}
The "fill" of the my UIView
get shadowed as well.
How can I draw the shadow only on the "border" path of my UIView
, excluding the UIView
fill?