UIListContentConfiguration.cellConfiguration() 静态方法
UIListContentConfiguration.cellConfiguration() 静态方法返回一份「一行主文字」样式的内容配置,上面还没有内容。
语法
UIListContentConfiguration.cellConfiguration()参数
无。
返回值
新建的 UIListContentConfiguration(实测)。text、secondaryText、image 都是 null。
异常
无。
示例
js
const content = UIListContentConfiguration.cellConfiguration();
content.text = '标题';
content.secondaryText = '说明';效果:得到一份「一行主文字」样式的内容,写给单元格的 contentConfiguration 之后显示出来。样式在屏幕上的样子未在模拟器验证,含义来自 Apple 的文档。
对应的 iOS API
+[UIListContentConfiguration cellConfiguration]。
参见
defaultContentConfiguration():和列表外观配套的那一份