【发布时间】:2020-11-28 04:34:03
【问题描述】:
在启动我的 tvOS 应用程序时,我遇到了与 DiffableDataSource 相关的崩溃:Thread 1: Expection: "Invalid parameter not satisfying: itemCount"。
发生在dataSource.apply(snapshot)线上。
当尝试在 Xcode 12 beta 4 上运行它时,我遇到了以下崩溃:
Thread 1: "Invalid update: invalid number of sections. The number of secxtions contained in the collection view after the update (1) must be equal to the number of sections contained in the collection view before hte update (1), plus or minus the number of sections inserted or deleted (1 inserted, 0 deleted)."
哪个更详细,但仍然没有提供有关为什么会发生这种情况的信息。
相同的代码在 iOS 上运行良好。
为什么会发生这种情况?
【问题讨论】:
标签: swift tvos diffabledatasource