swift 中对象可用的用户定义的运行时属性列表
List of user defined runtime attributes available for an object in swift
有没有办法(或网站)获取此对象或此对象的用户定义运行时属性列表?
例如,按钮的边框宽度。我想知道是否有类似 leftBorderWidth 的东西,但我真的不想尝试所有可能的组合...
谢谢
类型为 Bool
、NSNumber
、String
、CGPoint
、CGSize
的任何 属性(包括您自己定义的) , CGRect
, UIImage
, UIColor
或 NSRange
可以设置为用户定义的运行时属性。
borderWidth
是 button.layer
属性。 button.layer
class 是 CALayer
。您可以在此处查看所有 CALayer
属性:https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CALayer_class/index.html#//apple_ref/swift/cl/CALayer
有没有办法(或网站)获取此对象或此对象的用户定义运行时属性列表?
例如,按钮的边框宽度。我想知道是否有类似 leftBorderWidth 的东西,但我真的不想尝试所有可能的组合...
谢谢
类型为 Bool
、NSNumber
、String
、CGPoint
、CGSize
的任何 属性(包括您自己定义的) , CGRect
, UIImage
, UIColor
或 NSRange
可以设置为用户定义的运行时属性。
borderWidth
是 button.layer
属性。 button.layer
class 是 CALayer
。您可以在此处查看所有 CALayer
属性:https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CALayer_class/index.html#//apple_ref/swift/cl/CALayer