【问题标题】:Swift - beginInteractiveMovementForItem on iOS 16Swift - iOS 16 上的 beginInteractiveMovementForItem
【发布时间】:2022-10-06 17:39:41
【问题描述】:

在 collectionvView 中的 iOS 16 beginInteractiveMovementForItem 上抛出错误:

attempt to insert nil object from objects[0]\' terminating with uncaught exception of type NSException

这是我的代码:

collectionView.beginInteractiveMovementForItem(at: selectedIndexPath)

iOS 16 上是否有任何替代方案可供使用? 这里还有另一个类似的问题:UICollectionView crash when moving items on iOS 16 beta 但仍然没有答案。

    标签: swift collectionview


    【解决方案1】:

    只需添加延迟,它现在也可以在 iOS 16 上运行。

    【讨论】:

      猜你喜欢
      • 2023-01-16
      • 2022-12-20
      • 2022-11-11
      • 1970-01-01
      • 2022-10-20
      • 1970-01-01
      • 2016-05-11
      • 1970-01-01
      • 2022-10-17
      相关资源
      最近更新 更多