Skip to content

Commit

Permalink
More for iOS only
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanPodymov committed May 1, 2024
1 parent b0fbabf commit b9024f2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Sources/CommonAppleKit/CAListViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
10 changes: 5 additions & 5 deletions Sources/CommonAppleKit/CAScreenItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
4 changes: 3 additions & 1 deletion Tests/CommonAppleKitTests/CommonAppleKitTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,12 @@ final class CommonAppleKitTests: XCTestCase {
}

extension CommonAppleKitTests: CAListViewCellDelegate {
#if canImport(UIKit)
func onCellTap(data: Any?) {

}

#endif

func onAction(data: Any?) {

}
Expand Down

0 comments on commit b9024f2

Please sign in to comment.