Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Commit

Permalink
Enable drag to dismiss on video thumbs in tvOS
Browse files Browse the repository at this point in the history
  • Loading branch information
askeland committed May 9, 2017
1 parent 410a4e4 commit d5456e0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Source/ViewableController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,14 @@ class ViewableController: UIViewController {
let image = UIImage(named: "play")!
button.setImage(image, for: UIControlState())
button.alpha = 0
button.addTarget(self, action: #selector(ViewableController.playAction), for: .touchUpInside)


#if os(tvOS)
// Disable user interaction on play button to allow drag to dismiss video thumb on tvOS
button.isUserInteractionEnabled = false
#else
button.addTarget(self, action: #selector(ViewableController.playAction), for: .touchUpInside)
#endif

return button
}()

Expand Down

0 comments on commit d5456e0

Please sign in to comment.