I'm trying to add an overlay with a UIProgressView to a TVPosterView's imageView and seeing a lot of flickering when it has focus. I've tried other elements than a ProgressView and it would still flicker somewhat, but in this situation I need a ProgressView. I'd prefer the overlay to be interactable instead of just flattening it to an image and not using an overlayContentView.
The flickering is identical in simulators and on real devices.
The full code of the example gif is as follows:
import UIKit
import TVUIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let overlay = UIProgressView(frame: CGRect(x: 0, y: 550, width: 800, height: 20))
overlay.progressTintColor = .red
overlay.backgroundColor = .orange
overlay.progress = 0.5
let tvPosterView = TVPosterView(image: UIImage(named: "some-image"))
tvPosterView.frame = CGRect(x: 300, y: 300, width: 800, height: 600)
view.addSubview(tvPosterView)
tvPosterView.imageView.overlayContentView.addSubview(overlay)
}
}
Example gif: https://gfycat.com/KindBestAsianconstablebutterfly
Anyone know what I'm doing wrong? Or is there any better way to do this so I could avoid the flickering?