嗨,我正在研究Xcode和Obj-C,并且收到此警告:
弃用:'setText:'已弃用
我想知道什么是新方法
这是我的代码:
[cell setText:[NSString stringWithFormat:@"I am cell %d", indexPath.row]];
最佳答案
setText确实已被弃用。使用textLabel setText代替:
cell.textLabel.text = [NSString stringWithFormat:@"I am cell %d", indexPath.row];
关于objective-c - 不推荐使用SetText,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7220689/