Skip to content

Commit 4c5ae67

Browse files
authored
fix: fix pinchGestureRecognizer unavailability issue on tvos (#217)
1 parent 056ccbf commit 4c5ae67

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Sources/Amplitude/Plugins/iOS/UIKitElementInteractions.swift

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,16 @@ extension UIGestureRecognizer {
121121
guard state == .ended, let view else { return }
122122

123123
// Block scroll and zoom events for `UIScrollView`.
124-
if let scrollView = view as? UIScrollView, self === scrollView.panGestureRecognizer || self === scrollView.pinchGestureRecognizer {
125-
return
124+
if let scrollView = view as? UIScrollView {
125+
if self === scrollView.panGestureRecognizer {
126+
return
127+
}
128+
129+
#if !os(tvOS)
130+
if self === scrollView.pinchGestureRecognizer {
131+
return
132+
}
133+
#endif
126134
}
127135

128136
let gestureAction: String?

0 commit comments

Comments
 (0)