私はcustomTableViewセルを持っています - (ネットワークイベントの発生に基づいて)セルで更新したいだけです。私は最初のネットワーク呼び出しを行う際にiOS UITableView "セルの2つのアニメーションを作成しようとしています" "
は、だから私は実行します。
- (void)makeNetworkCall
{
[self.tableView beginUpdates];
// MAKE_NETWORK_CALL
[self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath]
withRowAnimation:UITableViewRowAnimationNone];
[self.tableView endUpdates]; // SIGABRT OCCURS HERE ON SECOND CALL
}
- (void)networkDataReturned:(NSDictionary*)dataReturned
{
// UPDATE_TABLE_VIEW_DATA_MODEL
[self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath]
withRowAnimation:UITableViewRowAnimationNone];
}
これは、セルがタップされている場合が(したがって、再び結果をネットワークイベントを呼び出し、完全にネットワークイベントが呼び出された初めての作品これは今、キャッシュされている)、私は次のエラーを取得する:
2011-06-22 11:19:11.262 App[3991:707] *** Assertion failure in -[_UITableViewUpdateSupport _setupAnimationsForExistingVisibleCells], /SourceCache/UIKit/UIKit-1448.89/UITableViewSupport.m:288
2011-06-22 11:19:11.327 App[3991:707] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Attempt to create two animations for cell'
*** Call stack at first throw:
(
0 CoreFoundation 0x32c7664f __exceptionPreprocess + 114
1 libobjc.A.dylib 0x36eb9c5d objc_exception_throw + 24
2 CoreFoundation 0x32c76491 +[NSException raise:format:arguments:] + 68
3 Foundation 0x32894573 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 62
4 UIKit 0x35f59d3b -[_UITableViewUpdateSupport(Private) _setupAnimationsForExistingVisibleCells] + 402
5 UIKit 0x35f58b81 -[_UITableViewUpdateSupport initWithTableView:updateItems:oldRowData:newRowData:oldRowRange:newRowRange:context:] + 296
6 UIKit 0x35f57dc1 -[UITableView(_UITableViewPrivate) _updateWithItems:withOldRowData:oldRowRange:newRowRange:context:] + 972
7 UIKit 0x35f57473 -[UITableView(_UITableViewPrivate) _endCellAnimationsWithContext:] + 4750
8 UIKit 0x35f612f9 -[UITableView endUpdatesWithContext:] + 28
9 UIKit 0x35f612d5 -[UITableView endUpdates] + 16
10 App 0x0005a033 -[CustomTableViewController tableView:didSelectRowAtIndexPath:] + 574
下記の@jjramos replyを参照してください。それはおそらく、それほど不吉な状況ではないかもしれません。 – clearlight