- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
fetched = NO;
self.title = @"Nearby";
// Custom initialization
liked = NO;
categories = [[NSArray alloc] init];
fundings = [[NSArray alloc] init];
stages = [[NSArray alloc] init];
}
return self;
}
我使用上面的代码。通过在 initWithNibName 函数中初始化我的所有变量,我有什么问题吗?那是正确的地方吗?