私はテーブルビューの不整合例外を取得しています。 テーブルビューのセルアクセサリビューをタップすると、テーブルビューに追加のセルが表示され、現在表示している行の下にポップアップするコントロールパネルが表示されます。一方、APIへのHTTPリクエストは、データの2ページ目を取得しています。コントロールパネルをアニメーション化している間にデータが入ってきたら、クラッシュします。非同期にセクション内の行数を更新します
'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (31) must be equal to the number of rows contained in that section before the update (32), plus or minus the number of rows inserted or deleted from that section (1 inserted, 1 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).'
httpコールバックコードを送信します。 – jackslash
このエラーは、通常、データソースを正しく管理していないこと、および/または更新後にリロードデータを呼び出さないことを示しています。 – TommyG
はい、reloadDataは、テーブルビューが新しいセルをアニメートしている間にhttpコールバックコードから呼び出されています。これを回避するにはどうしたらいいですか? – quantumpotato