1
그래서 Apple TV 원격 화살표 버튼 중 하나를 길게 누를 때 (터치 패드의 가장자리를 터치 할 때 트리거 됨) 화살표가 작동하지 않는 것처럼 보였습니다. 버튼을 클릭하십시오. 기본적으로 :tvOS : 화살 버튼을 길게 누르는 것을 감지 할 수 있습니까?
// This works
let longSelectRecognizer = UILongPressGestureRecognizer(target: self, action: #selector(longPressed(_:)))
longSelectRecognizer.allowedPressTypes = [UIPressType.Select.rawValue)]
self.addGestureRecognizer(longSelectRecognizer)
// This doesn't
let longArrowRecognizer = UILongPressGestureRecognizer(target: self, action: #selector(longPressed(_:)))
longArrowRecognizer.allowedPressTypes = [NSNumber(integer: UIPressType.LeftArrow.rawValue), NSNumber(integer: UIPressType.RightArrow.rawValue)]
self.addGestureRecognizer(longArrowRecognizer)
나는 UITouchGestureRecognizer
로 교체 시도하지만 (예상대로) 화살표