We've have a tvOS app for over 3 years and implemented our own swipe behavior for swipe up, left and right. In the tvOS 14 Beta the selectors on the swipe gestures are longer called when a swipe up occurs.
I created a simple example for a swipe up gesture to show what we are doing. Our Storyboard has a Container View which is an AvPlayerViewController.
Here is a the code for the ViewController.
I created a simple example for a swipe up gesture to show what we are doing. Our Storyboard has a Container View which is an AvPlayerViewController.
Here is a the code for the ViewController.
Code Block import UIKit import AVKit class ViewController: UIViewController { private var avPlayerViewController: AVPlayerViewController! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. // Use this string for the URL: "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_adv_example_hevc/master.m3u8") guard let url = URL(string: <copy string here> else { return } // Create an AVPlayer, passing it the HTTP Live Streaming URL. let player = AVPlayer(url: url) avPlayerViewController.requiresLinearPlayback = false avPlayerViewController.playbackControlsIncludeInfoViews = true avPlayerViewController.playbackControlsIncludeTransportBar = true avPlayerViewController?.player = player player.play() let swipeUpRecognizer = UISwipeGestureRecognizer(target: self, action: #selector(self.swipedUp(_:)) ) swipeUpRecognizer.direction = .up view.addGestureRecognizer(swipeUpRecognizer) } override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if let playerViewController = segue.destination as? AVPlayerViewController { avPlayerViewController = playerViewController playerViewController.showsPlaybackControls = true playerViewController.videoGravity = AVLayerVideoGravity.resizeAspect } } @objc func swipedUp(_ gesture: UIGestureRecognizer) { // NO LONGER CALLED print("SWIPED UP!") } }