Skip to content

Commit fd80c65

Browse files
committed
Fixed tv target.
1 parent 989a0c6 commit fd80c65

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
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 = '4.1.1'
4+
s.version = '4.1.2'
55
s.summary = 'Extension of Diffable API which allow not duplicate code and use less models. Included example for SideBar.'
66
s.homepage = 'https://github.com/ivanvorobei/SPDiffable'
77
s.source = { :git => 'https://github.com/ivanvorobei/SPDiffable.git', :tag => s.version }

Sources/SPDiffable/Table/DataSource/SPDiffableTableDataSource+UITableViewDelegate.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ extension SPDiffableTableDataSource: UITableViewDelegate {
3636
}
3737
}
3838

39+
#if canImport(UIKit) && (os(iOS))
3940
public func tableView(_ tableView: UITableView, leadingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {
4041
guard let item = getItem(indexPath: indexPath) else { return nil }
4142
return diffableDelegate?.diffableTableView?(tableView, leadingSwipeActionsConfigurationForItem: item, at: indexPath)
@@ -45,6 +46,7 @@ extension SPDiffableTableDataSource: UITableViewDelegate {
4546
guard let item = getItem(indexPath: indexPath) else { return nil }
4647
return diffableDelegate?.diffableTableView?(tableView, trailingSwipeActionsConfigurationForItem: item, at: indexPath)
4748
}
49+
#endif
4850

4951
open func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
5052
guard let item = self.getSection(index: section)?.header else { return nil }

Sources/SPDiffable/Table/Protocols/SPDiffableTableDelegate.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ import UIKit
2626

2727
@objc optional func diffableTableView(_ tableView: UITableView, didSelectItem item: SPDiffableItem, indexPath: IndexPath)
2828

29+
#if canImport(UIKit) && (os(iOS))
2930
@objc optional func diffableTableView(_ tableView: UITableView, leadingSwipeActionsConfigurationForItem item: SPDiffableItem, at indexPath: IndexPath) -> UISwipeActionsConfiguration?
3031

3132
@objc optional func diffableTableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForItem item: SPDiffableItem, at indexPath: IndexPath) -> UISwipeActionsConfiguration?
33+
#endif
3234
}

0 commit comments

Comments
 (0)