Skip to content

Commit

Permalink
Fixed tv target.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanvorobei committed Mar 20, 2022
1 parent 989a0c6 commit fd80c65
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion SPDiffable.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = 'SPDiffable'
s.version = '4.1.1'
s.version = '4.1.2'
s.summary = 'Extension of Diffable API which allow not duplicate code and use less models. Included example for SideBar.'
s.homepage = 'https://github.com/ivanvorobei/SPDiffable'
s.source = { :git => 'https://github.com/ivanvorobei/SPDiffable.git', :tag => s.version }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ extension SPDiffableTableDataSource: UITableViewDelegate {
}
}

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

open func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
guard let item = self.getSection(index: section)?.header else { return nil }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ import UIKit

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

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

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

0 comments on commit fd80c65

Please sign in to comment.