mirror of
https://github.com/confirmedcode/Lockdown-iOS.git
synced 2025-12-21 12:14:02 +01:00
[KB-2177, KB-2193]: Creating a list and View the Lists, delete the list
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user