Closed stan94 closed 9 years ago
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
if (tableView == self.mainTableView)
{
return [self.fightcardArray count];
}
else
{
return [super tableView:tableView numberOfRowsInSection:section];
}
}
Hi Tim,
Everything works fine until I added another table view (a normal table view with cells). I wrote the NumberOfRowsInSection and it somehow conflicting with your table view.
Here are my code -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { if (tableView == self.mainTableView) { return [self.fightcardArray count]; } else { return 0; } } mainTableView is the new table view that I added. What should I put in the Else block so that it can differentiate and return the correct value?