SetText已弃用

Rol*_*llo 1 xcode objective-c ios xcode4

嗨,我正在研究Xcode和Obj-C,我收到了这个警告:

弃用:'setText:'已弃用

我想知道新方法是什么

这是我的代码:

[cell setText:[NSString stringWithFormat:@"I am cell %d", indexPath.row]];
Run Code Online (Sandbox Code Playgroud)

sai*_*mac 6

确实已弃用setText.请改用textLabel setText:

cell.textLabel.text = [NSString stringWithFormat:@"I am cell %d", indexPath.row];
Run Code Online (Sandbox Code Playgroud)