记得加上下面这个方法,不然会报错
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{
if (self = [super initWithNibName:@"类名"
bundle:[NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"bundle名" ofType:@"bundle"]]]) {
}
return self;
}