首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >iOS15 / iPhone12 setContentOffset动画问题

iOS15 / iPhone12 setContentOffset动画问题
EN

Stack Overflow用户
提问于 2021-10-01 04:59:47
回答 1查看 324关注 0票数 2

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

每个定时器都会寻呼多个CollectionViews,但寻呼仅在iOS15/iPhone12设备上不能正常工作。

分页卡顿,动画不能正常工作。

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

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

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

代码语言:javascript
复制
// 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系列有问题。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-10-29 05:52:13

已在iOS 15.1中修复感谢苹果。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69400634

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档