dynamicCellHeight:使用自动布局动态调整 tableView 单元格大小的示例

时间:2021-07-08 18:38:15
【文件属性】:
文件名称:dynamicCellHeight:使用自动布局动态调整 tableView 单元格大小的示例
文件大小:4.52MB
文件格式:ZIP
更新时间:2021-07-08 18:38:15
Swift 动态单元高度 使用自动布局动态调整 tableView 单元格大小的示例 用法: 确保要动态调整大小的单元格类符合 SizeableCell 和 UpdateableCell 协议。 dynamicCellSizer = DynamicCellSizer(tableView: tableView) dynamicCellSizer?.addSizingCellIdentifier("TextCellIdentifier") dynamicCellSizer?.addSizingCellIdentifier("ImageCellIdentifier") dynamicCellSizer 保留对添加的每种单元格类型的引用,这些单元格永远不会显示在 tableView 中。 相反,单元格配置了相应 indexPath 的数据,强制使用 sizingCell.conte
【文件预览】:
dynamicCellHeight-master
----screen-shot.png(252KB)
----AutolayoutCellPoC.xcodeproj()
--------project.xcworkspace()
--------project.pbxproj(19KB)
--------xcuserdata()
----MyPlayground.playground()
--------section-1.swift(963B)
--------timeline.xctimeline(120B)
--------contents.xcplayground(247B)
----AutolayoutCellPoCTests()
--------AutolayoutCellPoCTests.swift(941B)
--------Info.plist(756B)
----LICENSE(1KB)
----AutolayoutCellPoC()
--------ViewController.swift(3KB)
--------RandomNumbers.swift(3KB)
--------TextCell.swift(1KB)
--------Base.lproj()
--------AppDelegate.swift(2KB)
--------DynamicCellSizer.swift(2KB)
--------TableViewData.swift(3KB)
--------ImageCell.swift(1KB)
--------Images.xcassets()
--------Info.plist(1KB)
--------SizeableTableViewCell.swift(337B)
----.gitignore(495B)
----README.md(1KB)

网友评论