diff --git a/Sources/CommonAppleKit/CAListViewCell.swift b/Sources/CommonAppleKit/CAListViewCell.swift index 55d0ef7..8cad2f1 100644 --- a/Sources/CommonAppleKit/CAListViewCell.swift +++ b/Sources/CommonAppleKit/CAListViewCell.swift @@ -9,8 +9,11 @@ import Foundation public protocol CAListViewCellDelegate: AnyObject { + #if canImport(UIKit) func onCellTap(data: Any?) + #endif func onAction(data: Any?) + func onHeaderWillBeDisplayed() func onFooterWillBeDisplayed() } diff --git a/Sources/CommonAppleKit/CAScreenItem.swift b/Sources/CommonAppleKit/CAScreenItem.swift index 89ff30e..320cdcb 100644 --- a/Sources/CommonAppleKit/CAScreenItem.swift +++ b/Sources/CommonAppleKit/CAScreenItem.swift @@ -15,17 +15,17 @@ open class CAScreenItem: CAView { } #endif + open func didChangeTraitCollection() { + + } + #if canImport(AppKit) open override func mouseDown(with _: CAEvent) { didTap() } - #endif - - open func didChangeTraitCollection() { - - } open func didTap() { } + #endif } diff --git a/Tests/CommonAppleKitTests/CommonAppleKitTests.swift b/Tests/CommonAppleKitTests/CommonAppleKitTests.swift index 7afbdbd..95b7a53 100644 --- a/Tests/CommonAppleKitTests/CommonAppleKitTests.swift +++ b/Tests/CommonAppleKitTests/CommonAppleKitTests.swift @@ -171,10 +171,12 @@ final class CommonAppleKitTests: XCTestCase { } extension CommonAppleKitTests: CAListViewCellDelegate { + #if canImport(UIKit) func onCellTap(data: Any?) { } - + #endif + func onAction(data: Any?) { }