我得到错误,而使用UITableView作为'setText:'已弃用行cell.text = cellvalue 请任何人都可以如何解决这个问题?我得到错误,而使用UITableView作为'setText:'已弃用
- (UITableViewCell *)tableView:(UITableView *)atable cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [atable dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
NSString *cellValue = [listOfItems objectAtIndex:indexPath.row];
cell.text = cellValue; //Error 'setText:' is deprecated
return cell;
}
谢谢...它的工作.. – Cintu 2010-10-26 14:01:37
omg我很愚蠢,我一直把cell.textLabel就是这样,但我忘了把.text放在最后,非常感谢你! – PatrickGamboa 2011-04-04 16:19:47