1

user defined runtime attribute

I define some user defined runtime attribute like shadow in utilities

when button state change like normal to selected

how can I get rid of the shadow

help appreciated

Community
  • 1
  • 1
jin
  • 47
  • 1
  • 8
  • This might be helpful https://stackoverflow.com/questions/39627724/uiview-shadow-using-user-defined-runtime-attributes – Vini App Sep 17 '17 at 00:11

1 Answers1

0

You can just set the properties on the view like any other property.

layer.shadowColor = UIColor.gray.cgColor
layer.cornerRadius = someotherValue

and so on.

rounak
  • 8,669
  • 3
  • 38
  • 58
  • Thanks for help.. I'm not sure what you mean I have problem with setting the attribute when button is selected – jin Sep 17 '17 at 06:57
  • @jin add a target selector for the state change event and change all these properties in that callback method – rounak Sep 17 '17 at 21:24