开发者

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

开发者 https://www.devze.com 2023-03-04 18:19 出处:网络
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 depr
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

精彩评论

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