我已经创建了一个带有xib的自定义UIView
。
此外,我在我的storyboard中有一个UIViewController
,我向其中添加了一个UIView
并将其类设置为我的自定义UIView
。
但是当我运行应用程序时,视图没有子视图。调试时,所有子视图都为null。
在自定义UIView
的.m文件中,存在以下初始化方法:
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
}
return self;
}
- (id)initWithCoder:(NSCoder *)aDecoder
{
self = [super initWithCoder:aDecoder];
if (self) {
}
return self;
}
我漏掉了什么?