我想将数据显示到表格视图单元格中,我该如何实现这一点。请帮我
-(UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *feedsTableIdentifier = @"FeedsTableIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:feedsTableIdentifier];
if (cell==nil) {
[[NSBundle mainBundle] loadNibNamed:@"FeedsTableViewCell" owner:self options:nil];
cell=tableViewCell;
self.tableViewCell=nil;
}
title=(UILabel *)[cell viewWithTag:1];
title.text=[NSString stringWithFormat:@"%d",indexPath.row];
postedBy=(UILabel*)[cell viewWithTag:2];
postedBy.text=[NSString stringWithFormat:@"%d",indexPath.row];
onDate = (UILabel *)[cell viewWithTag:3];
onDate.text=[NSString stringWithFormat:@"%d",indexPath.row];
return cell;
}
请帮我。