Skip to content

UIListContentConfiguration.subtitleCellConfiguration() 静态方法 ​

UIListContentConfiguration.subtitleCellConfiguration() 静态方法返回一份「主文字下面一行副文字」样式的内容配置,上面还没有内容。

语法 ​

UIListContentConfiguration.subtitleCellConfiguration()

参数 ​

无。

返回值 ​

新建的 UIListContentConfiguration(实测)。text、secondaryText、image 都是 null。

异常 ​

无。

示例 ​

js
const content = UIListContentConfiguration.subtitleCellConfiguration();
content.text = '标题';
content.secondaryText = '说明';

效果:得到一份「主文字下面一行副文字」样式的内容,写给单元格的 contentConfiguration 之后显示出来。样式在屏幕上的样子未在模拟器验证,含义来自 Apple 的文档。

对应的 iOS API ​

+[UIListContentConfiguration subtitleCellConfiguration]。

参见 ​