Skip to content

Commit 54af741

Browse files
committed
Remove extend for custom table cell.
1 parent aece327 commit 54af741

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

SPDiffable.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = 'SPDiffable'
4-
s.version = '1.6.7'
4+
s.version = '1.6.8'
55
s.summary = 'Extenshion of Diffable API which allow not duplicate code and use less models.'
66
s.homepage = 'https://github.com/ivanvorobei/SPDiffable'
77
s.source = { :git => 'https://github.com/ivanvorobei/SPDiffable.git', :tag => s.version }

Sources/SPDiffable/Table/Models/SPDiffableCustomTableRow.swift

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,27 @@ import UIKit
2727
You can customise color and font of labels.
2828
Diffrent way to manage `selectionStyle`, here it called `higlightStyle` and have more styles.
2929
*/
30-
open class SPDiffableCustomTableRow: SPDiffableTableRow {
30+
open class SPDiffableCustomTableRow: SPDiffableActionableItem {
3131

32+
open var text: String
3233
open var textColor: UIColor?
3334
open var textFont: UIFont?
35+
open var detail: String? = nil
36+
open var icon: UIImage? = nil
3437
open var higlightStyle: SPDiffableCustomTableViewCell.HiglightStyle
38+
open var accessoryType: UITableViewCell.AccessoryType
3539

3640
public init(identifier: String? = nil, text: String, textColor: UIColor? = nil, textFont: UIFont? = nil, detail: String? = nil, icon: UIImage? = nil, accessoryType: UITableViewCell.AccessoryType = .none, higlightStyle: SPDiffableCustomTableViewCell.HiglightStyle = .none, action: Action? = nil) {
3741

42+
self.text = text
3843
self.textColor = textColor
3944
self.textFont = textFont
45+
46+
self.detail = detail
47+
self.icon = icon
4048
self.higlightStyle = higlightStyle
49+
self.accessoryType = accessoryType
4150

42-
super.init(identifier: identifier, text: text, detail: detail, icon: icon, accessoryType: accessoryType, action: action)
51+
super.init(identifier: identifier ?? text, action: action)
4352
}
4453
}

Sources/SPDiffable/Table/SPDiffableTableCellProviders.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ public enum SPDiffableTableCellProviders {
105105
cell.detailTextLabel?.text = item.detail
106106
cell.imageView?.image = item.icon
107107
cell.accessoryType = item.accessoryType
108-
cell.selectionStyle = item.selectionStyle
109108
cell.higlightStyle = item.higlightStyle
110109
return cell
111110
}

0 commit comments

Comments
 (0)