UITableViewCell中不推荐使用的警告消息

sus*_*tha 2 iphone objective-c uitableview ios

setText是不推荐使用的警告消息UITableViewCell

[cell setText:animal.name];
Run Code Online (Sandbox Code Playgroud)

编译时 但程序运行正常.

Ila*_*ian 12

是的,setText:UITableViewCell中已被弃用.

使用以下代替.

[cell.textLabel setText:animal.name];
Run Code Online (Sandbox Code Playgroud)

  • 如果你满意的答案,试着接受. (5认同)