0

I'm creating an UICollectionView that moves automatically, without user interaction, using:

private func startWaterfallAnimation() {
    var timer = Timer.init()
    timer = Timer.scheduledTimer(withTimeInterval: 0.06, repeats: true) { (_) in
        if !self.isPaused{
            UIView.animate(withDuration: 0.06, delay: 0, options: [.curveLinear], animations: {
                self.setContentOffset(CGPoint(x: self.contentOffset.x, y: self.contentOffset.y - CGFloat(self.speed)), animated: false)
            }, completion: nil)
        } else {
            timer.invalidate()
        }
    }
}

Unfortunately, this is the behaviour: https://giphy.com/gifs/1xV9RiPlOoSTugIx1s, cells flick when moving.

My question is: How can I programmatically scroll in a smooth way at Apple TV, without the flick? Maybe another approach?

Gustavo Vollbrecht
  • 3,188
  • 2
  • 19
  • 37

1 Answers1

0

This is not a code problem, I've tried many approaches. It has to do with the TV resolution, pixels are bigger and when trying to scroll something programmatically in a smooth way, if you do it slow it will flick in most TVs.

Gustavo Vollbrecht
  • 3,188
  • 2
  • 19
  • 37