UIView Shadow using User Defined Runtime Attributes
<p>I'm having a hard time getting a drop shadow to show when I am using "User Defined Runtime Attributes".</p>

<p>It seems to work completely fine if I use code, as follows.</p>

<pre><code>func formatView(view: UIView, cornerRadius: Bool) {

    if (cornerRadius) {view.layer.cornerRadius = 12 }
    view.layer.shadowColor = UIColor.black.cgColor
    view.layer.shadowOffset = CGSize.zero
    view.layer.shadowRadius = 3
    view.layer.shadowOpacity = 0.3
}
</code></pre>

<p>But when I try it with User Defined Runtime Attributes it doesn't show anymore. These are the ones I'm currently using.</p>

<p><a href="https://i.stack.imgur.com/mNMbR.png" rel="noreferrer"><img src="https://i.stack.imgur.com/mNMbR.png" alt="enter image description here"></a></p>

<p>The only thing that is weird is if I remove the <code>layer.shadowColor</code> attribute, then it seems to work again. But I can no longer control the color. It seems to default to black, but if I ever decide to choose a grey color instead, I wouldn't be able to change it.</p>

<p>Is this because the Color Attribute is a UIColor and shadowColor expects a CGColor?</p>