I know default values of IBInspectable-properties can be set as:
@IBInspectable var propertyName:propertyType = defaultValue
in Swift. But how do I achieve a similar effect in Objective-C so that I can have default value of some property set to something in Interface Builder?
Since
IBInspectable
values are set afterinitWithCoder:
and beforeawakeFromNib:
, you can set the defaults ininitWithCoder:
method.