[KB-2177, KB-2193]: Creating a list and View the Lists, delete the list

This commit is contained in:
Aliaksandr Dvoineu
2023-04-11 06:27:13 +03:00
parent 524f095904
commit dae9ba76fc
31 changed files with 2415 additions and 205 deletions

View File

@@ -10,11 +10,23 @@ import UIKit
final class StaticTableView: UITableView {
// Resizing UITableView to fit content
override var contentSize: CGSize {
didSet {
invalidateIntrinsicContentSize()
}
}
override var intrinsicContentSize: CGSize {
layoutIfNeeded()
return CGSize(width: UIView.noIntrinsicMetric, height: contentSize.height)
}
var rows: [SelectableTableViewCell] = []
var deselectsCellsAutomatically: Bool = false
override init(frame: CGRect, style: UITableView.Style) {
super.init(frame: frame, style: style)
super.init(frame: frame, style: .insetGrouped)
setup()
}
@@ -126,6 +138,10 @@ extension StaticTableView: UITableViewDataSource {
return 1
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 0
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return rows.count
}