Dar*_*zer 29 iphone xcode warnings deprecated uitableview
" 开始iPhone开发"(由Dave Mark和Jeff LaMarche编写)中的代码分配给UITableViewCell文本属性:
UITableViewCell *cell = ...
...
cell.text = ...
Run Code Online (Sandbox Code Playgroud)
这个赋值会引发"'setText'被弃用......"警告.我该怎么用?
另外,如何在不重新输入整个内容的情况下打开警告中的长URL(在Xcode中)?
mar*_*rcc 76
尝试:
cell.textLabel.text = @"test";
Run Code Online (Sandbox Code Playgroud)
(啊,现在回答3.0 SDK问题真好)
12 年多后 Apple 将弃用textLabel:
现在开始iOS 14,您将需要使用UIListContentConfiguration:
斯威夫特:
var content = cell.defaultContentConfiguration()
content.text = "text label"
content.secondaryText = "detail text"
cell.contentConfiguration = content
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
24683 次 |
| 最近记录: |