How can I set a User Defined Runtime Attribute in Xcode to a value associated with the object? For example, I want to set the layer.cornerRadius of a view to always be size.width / 2 to round the corners. I know that if I know the size of the view, I can set it to a constant like this:
Is there a way to do this dynamically? I have tried replacing 150 with size.width / 2 but I get the following warning:
The value “size.width / 2” is invalid.
Please provide a valid value.
