iOS 在storyboard中显示自定义属性
2017-08-23 本文已影响0人
GrayMantis
需要使用 IB_DESIGNABLE 和IBInspectable关键字
IB_DESIGNABLE
@interface MyButton : UIButton
@property (nonatomic)IBInspectable BOOL isOkButton;
@end
效果图如下:
![](https://img.haomeiwen.com/i5818512/01e333746c3f35e7.png)
需要使用 IB_DESIGNABLE 和IBInspectable关键字
IB_DESIGNABLE
@interface MyButton : UIButton
@property (nonatomic)IBInspectable BOOL isOkButton;
@end
效果图如下: