myaI有這樣的代碼:IOS:委託方法有兩個的tableView
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
if (tableView == firstTableView){
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if(cell == nil){
cell = [[[UITableViewCell alloc]initWithStyle:UITableViewStylePlain reuseIdentifier:CellIdentifier] autorelease] ;
}
cell.textLabel.text = [myArray objectAtIndex:indexPath.row];
return cell;
}
}
我檢查的tableview是firsttableview,但它給我一個警告,因爲該方法沒有「返回」細胞,我怎麼能解決?
我不明白你要做什麼。 「這個方法沒有'返回單元'」是什麼意思? –