您的位置:首页 > 其它

使用IB_DESIGNABLE与IBInspectable特性实现可在视图编辑器的功能栏中设置

2015-09-08 10:28 169 查看
当我们在自定义一个控件的时候,为了在视图编辑器中方便进行设置自定义了的新属性

可以用以下方式实现,只要在相应地方加上:IB_DESIGNABLE 和 IBInspectable

IB_DESIGNABLE
@interface ZTransitionSubmitButton : UIButton <UIViewControllerTransitioningDelegate>

@property (nonatomic, retain) IBInspectable  UIColor *highlightedBackgroundColor;
@property (nonatomic, retain) IBInspectable  UIColor *normalBackgroundColor;

@end
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: