开发者

What is the difference between "cell.text" and "cell.textlabel.text"?

cell.text = [std objectForKey:@"name"];  
cell.textlabel.text = [std objectforkey:@"name"];  

When I use the first option it shows a warning message: "text is deprecate开发者_Python百科d".


The deprecation warning should make it obvious what is the difference: One is the old name, the other one is the new name.

The old name is still supported for compatibility, but should not be used in new applications, as it will be removed in the future (hence the warning).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜