IB_DESIGNABLE未在情节提要中呈现

问题描述

#import "UIViewTest.h"

@implementation UIViewTest

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/


- (id) initWithCoder:(NSCoder *)coder{
    self = [super initWithCoder:coder];
    if(self){
        self.backgroundColor = UIColor.redColor;
    }
    
    return self;
    
}

- (id)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    
    if(self){
        self.backgroundColor = UIColor.redColor;
    }
    
    return self;
}

@end

我有此代码可在设备上运行,但在IB中似乎不起作用

IB_DESIGNABLE @interface  UIViewTest : UIView
@end

我尝试将目标设置为继承,尝试指定模块,但似乎无济于事。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)