【问题标题】:iOS15 / iPhone12 setContentOffset animate IssueiOS 15 / iPhone 12 setContentOffset 动画问题
【发布时间】:2021-11-22 19:00:41
【问题描述】:

发生在iOS15/iPhone12系列设备上。

多个 CollectionView 用每个计时器分页,但分页仅在 iOS15/iPhone12 设备上无法正常工作。

分页卡顿,动画不正常。

我尝试使用 Rx 实现计时器,但症状相同。

在其他设备、其他iOS版本上正常运行。

有人遇到过和我一样的问题吗?

// CollectionView has the following timer code and performs timer operation independently.
// each CollectionView's paging interval is 1.0 seconds 1.3 seconds and 1.6 seconds.

func startTimer(interval: CGFloat) {
    let timer1 = Timer.scheduledTimer(timeInterval: interval,
                                      target: self,
                                      selector: #selector(rolling1),
                                      userInfo: nil,
                                      repeats: true)
  }
  
  @objc func rolling1() {
    DispatchQueue.main.async {
      self.offset1 = CGPoint.init(x: self.offset1.x + UIScreen.main.bounds.width, y: self.offset1.y)
      self.collectionView?.setContentOffset(self.offset1, animated: true)
    }
  }

运动画面如下。

它可以在所有 iOS 14 设备上正常运行。

在除iPhone 12系列以外的iOS15设备上也能正常使用。

iOS15上只有iPhone 12系列有问题。

【问题讨论】:

  • 我对 iPhone 12 系列和 iPhone 13 Pro 有同样的问题。

标签: animation collectionview ios15 iphone12


【解决方案1】:

在 iOS 15.1 中已修复,感谢 Apple..

【讨论】:

  • 能否提供相关链接?谢谢……
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2011-04-25
  • 2021-12-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多