0
我有一个UITableViewController的子类,当我在viewDidLoad中调用self.tableView时,它崩溃并一直调用相同的方法。我已经将它从使用故事板(它工作正常)转换为代码,现在它出现了这个错误。虽然我有一个UITableViewCell子类的xib文件。tableView属性导致循环
- (void)viewDidLoad
{
[super viewDidLoad];
UINib *nib = [UINib nibWithNibName:@"AddCell" bundle:nil];
//here
[self.tableView registerNib:nib forCellReuseIdentifier:@"AddCell"];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(cancel:)];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(done:)];
// Uncomment the following line to preserve selection between presentations.
// self.clearsSelectionOnViewWillAppear = NO;
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
}
想知道是否有人有同样的问题,或者如果有解决方案。
在此先感谢
我不知道,如果是这样,我怎么解决?谢谢! – user1628311
不要在自动方法中打开一个笔尖,然后调用该自动方法,然后再打开另一个笔尖......直到出现堆栈溢出。 –
好吧,你知道为什么这个故事板没有发生吗? – user1628311