如何在storyboard中,无需运行就可以即时的浏览view的的layer属性更改
列入增加了圆角,boardcolor,等等。之前看到一篇文章说了方法,时间长了又忘记了。有哪位大神告知
kinov
9 years, 5 months ago
Answers
@IBDesignable
class MyCustomView: UIView {
@IBInspectable var textColor: UIColor
@IBInspectable var borderColor: UIColor = UIColor.whiteColor() {
didSet { layer.borderColor = borderColor.CGColor }
}
@IBInspectable var iconHeight: CGFloat
/* ... */
}
https://developer.apple.com/library/ios/recipes/xcode_help-IB_objects_...
cdqclq
answered 9 years, 5 months ago