问题标签 [reactivekit]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
swift - 无效更新:反应式编程问题中第 0 节中的项目数无效
我遇到了很大的麻烦,因为当我在我的单元格中选择一个单元格collectionView
并更改我的数组数据时,我收到了以下错误消息:
'无效更新:第0节中的项目数无效。更新后现有节中包含的项目数(2)必须等于更新前该节中包含的项目数(2),加上或减去从该部分插入或删除的项目数(1 插入,0 删除)加上或减去移入或移出该部分的项目数(0 移入,0 移出)。
它发生在 iOS 13 之前。在 iOS 13 和更高版本中运行良好。有我的代码: