[iOS] IBDesignable & IBInspectable
ex:
@IBDesignable
class MyView: UIView {
@IBInspectable var myColor: UIColor = UIColor.white //注意需明确定义型态
@IBInspectable var myTitle: String {
get {
return ""
}
set {
}
}
}
缺點: 無法使用code一次批次修改大量參數
Last updated