我必须正确获取 UITableView 上的核心数据值,但我没有在 UILabel 上获取核心数据值。
(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellId = @"Cell";
Cell *cell=[table dequeueReusableCellWithIdentifier:CellId];
if (cell==nil) {
[[NSBundle mainBundle]loadNibNamed:@"Cell" owner:self options:nil];
cell=self.custom;
}
// Get the event corresponding to the current index path and configure the table view cell.
Student *stu = (Student *)[dataarr objectAtIndex:indexPath.row];
cell.item.text = [stu name];
cell.rate.text = [stu rate];
currentindex=indexPath.row;
return cell;
}