Questions tagged «ibdesignable»

11
IB_DESIGNABLE,IBInspectable-接口构建器不会更新
我有以下代码集: CustomView.h #import <UIKit/UIKit.h> IB_DESIGNABLE @interface CustomView : UIView @property (nonatomic) IBInspectable UIColor *borderColor; @property (nonatomic) IBInspectable CGFloat borderWidth; @property (nonatomic) IBInspectable CGFloat cornerRadius; @end CustomView.m #import "CustomView.h" @implementation CustomView - (void)setBorderColor:(UIColor *)borderColor { _borderColor = borderColor; self.layer.borderColor = borderColor.CGColor; } - (void)setBorderWidth:(CGFloat)borderWidth { _borderWidth = borderWidth; self.layer.borderWidth = borderWidth; …

16
界面生成器-无法从路径加载可设计项(空)
我已经创建了一些自定义控件,并在新项目中使用它们。但是,我在界面生成器中不断出错: Failed to update auto layout status: Failed to load designables from path (null) 要么 Failed to render instance of <control>: Failed to load designables from path (null) 我已经测试了另一个项目中的控件,它们似乎在界面生成器中正确呈现,但是我无法让它们在当前项目中正常工作。是什么导致此错误,我该如何解决? 提前致谢...
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.