IB_DESIGNABLE
让你的自定 UIView 可以在 IB 中预览。
IBInspectable
让你的自定义 UIView 的属性出现在 IB 中 Attributes inspector
IB_DESIGNABLE
@interface CircleView : UIView
@property (nonatomic, assign) IBInspectable CGFloat lineWidth;
@property (nonatomic, assign) IBInspectable CGFloat radius;
@property (nonatomic, strong) IBInspectable UIColor *color;
@property (nonatomic, assign) IBInspectable BOOL fill;
@end