3

Is there a way (or a web site) to get the list of user defined runtime attributes for this or this object?

For example, there is the borderWidth for a button. I'm wondering if there is something like leftBorderWidth but don't really want to try all possible combination...

Thanks

Kirsteins
  • 27,065
  • 8
  • 76
  • 78
Nico
  • 6,269
  • 9
  • 45
  • 85

1 Answers1

2

Any property (including your own defined) that is of type Bool, NSNumber, String, CGPoint, CGSize, CGRect, UIImage, UIColor or NSRange can be set as user defined runtime attributes.

borderWidth is button.layer propery. button.layer class is CALayer. You can check out all CALayer properties here: https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CALayer_class/index.html#//apple_ref/swift/cl/CALayer

Kirsteins
  • 27,065
  • 8
  • 76
  • 78
  • How can we retrieve a custom property? – Felipe Jan 23 '20 at 01:56
  • Actually, I think the answer is here: https://stackoverflow.com/questions/15007542/how-to-access-user-defined-runtime-attribute-from-the-sender-object – Felipe Jan 23 '20 at 02:03