Skip to content

Commit

Permalink
fix: fix tvos issue
Browse files Browse the repository at this point in the history
  • Loading branch information
PouriaAmini committed Jul 24, 2024
1 parent c29eb55 commit 044f4fa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Sources/Amplitude/Plugins/iOS/UIKitUserInteractions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,14 @@ extension UISegmentedControl {
}
}

extension UIDatePicker {
extension UIPageControl {
override func amp_shouldTrack(_ action: Selector, for target: Any?) -> Bool {
actions(forTarget: target, forControlEvent: .valueChanged)?.contains(action.description) ?? false
}
}

extension UIPageControl {
#if !os(tvOS)
extension UIDatePicker {
override func amp_shouldTrack(_ action: Selector, for target: Any?) -> Bool {
actions(forTarget: target, forControlEvent: .valueChanged)?.contains(action.description) ?? false
}
Expand All @@ -217,5 +218,6 @@ extension UISwitch {
actions(forTarget: target, forControlEvent: .valueChanged)?.contains(action.description) ?? false
}
}
#endif

#endif

0 comments on commit 044f4fa

Please sign in to comment.