remove isPrototype
This commit is contained in:
parent
4b4d2a616d
commit
8477cea35b
|
|
@ -19,7 +19,7 @@ class AutolayoutTableViewCell: UITableViewCell, ConfigurableCell {
|
|||
@IBOutlet var titleLabel: UILabel!
|
||||
@IBOutlet var subtitleLabel: UILabel!
|
||||
|
||||
func configure(with string: T, isPrototype: Bool) {
|
||||
func configure(with string: T) {
|
||||
|
||||
titleLabel.text = LoremIpsumTitle
|
||||
subtitleLabel.text = LoremIpsumBody
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import TableKit
|
|||
|
||||
class ConfigurableTableViewCell: UITableViewCell, ConfigurableCell {
|
||||
|
||||
func configure(with text: String, isPrototype: Bool) {
|
||||
func configure(with text: String) {
|
||||
|
||||
accessoryType = .DisclosureIndicator
|
||||
textLabel?.text = text
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class NibTableViewCell: UITableViewCell, ConfigurableCell {
|
|||
|
||||
@IBOutlet weak var titleLabel: UILabel!
|
||||
|
||||
func configure(with number: Int, isPrototype: Bool) {
|
||||
func configure(with number: Int) {
|
||||
titleLabel.text = "\(number)"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public protocol ConfigurableCell: ReusableCell {
|
|||
|
||||
static func estimatedHeight() -> CGFloat?
|
||||
static func defaultHeight() -> CGFloat?
|
||||
func configure(with _: T, isPrototype: Bool)
|
||||
func configure(with _: T)
|
||||
}
|
||||
|
||||
public extension ReusableCell where Self: UITableViewCell {
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class PrototypeHeightStrategy: CellHeightCalculatable {
|
|||
|
||||
cell.bounds = CGRectMake(0, 0, tableView.bounds.size.width, cell.bounds.height)
|
||||
|
||||
row.configure(cell, isPrototype: true)
|
||||
row.configure(cell)
|
||||
|
||||
cell.setNeedsLayout()
|
||||
cell.layoutIfNeeded()
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ public class TableDirector: NSObject, UITableViewDataSource, UITableViewDelegate
|
|||
cell.layoutIfNeeded()
|
||||
}
|
||||
|
||||
row.configure(cell, isPrototype: false)
|
||||
row.configure(cell)
|
||||
invoke(action: .configure, cell: cell, indexPath: indexPath)
|
||||
|
||||
return cell
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import UIKit
|
|||
|
||||
public protocol RowConfigurable {
|
||||
|
||||
func configure(cell: UITableViewCell, isPrototype: Bool)
|
||||
func configure(cell: UITableViewCell)
|
||||
}
|
||||
|
||||
public protocol RowActionable {
|
||||
|
|
@ -78,8 +78,8 @@ public class TableRow<ItemType, CellType: ConfigurableCell where CellType.T == I
|
|||
|
||||
// MARK: - RowConfigurable -
|
||||
|
||||
public func configure(cell: UITableViewCell, isPrototype: Bool) {
|
||||
(cell as? CellType)?.configure(with: item, isPrototype: isPrototype)
|
||||
public func configure(cell: UITableViewCell) {
|
||||
(cell as? CellType)?.configure(with: item)
|
||||
}
|
||||
|
||||
// MARK: - RowActionable -
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class TestTableViewCell: UITableViewCell, ConfigurableCell {
|
|||
return TestTableViewCellOptions.EstimatedHeight
|
||||
}
|
||||
|
||||
func configure(with item: T, isPrototype: Bool) {
|
||||
func configure(with item: T) {
|
||||
textLabel?.text = item.title
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue