Some refactoring
This commit is contained in:
parent
65cf31717b
commit
a768352b47
|
|
@ -2,7 +2,7 @@ import UIKit
|
|||
|
||||
public final class ExpandableCellHeightCalculator: RowHeightCalculator {
|
||||
|
||||
private(set) weak var tableView: UITableView?
|
||||
private weak var tableView: UITableView?
|
||||
|
||||
private var prototypes = [String: UITableViewCell]()
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import UIKit
|
|||
|
||||
extension UITableViewCell {
|
||||
|
||||
public var tableView: UITableView? {
|
||||
var tableView: UITableView? {
|
||||
var view = superview
|
||||
|
||||
while view != nil && !(view is UITableView) {
|
||||
|
|
@ -12,7 +12,7 @@ extension UITableViewCell {
|
|||
return view as? UITableView
|
||||
}
|
||||
|
||||
public var indexPath: IndexPath? {
|
||||
var indexPath: IndexPath? {
|
||||
guard let indexPath = tableView?.indexPath(for: self) else {
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue