ios - UITableViewRowAnimation is ignored -


i'm using nsfetchedresultscontroller populate table. data in table sorted according timestamp in ascending order (latest message @ bottom). more data loaded via "infinite scroll" top: e.g. when user scrolls past top, more messages loaded. nsfetchedresultscontrollerdelegate defined usual, recommended in apple documentation: new rows inserted via

- (void)controller:(nsfetchedresultscontroller*)controller    didchangeobject:(id)anobject        atindexpath:(nsindexpath*)indexpath      forchangetype:(nsfetchedresultschangetype)type       newindexpath:(nsindexpath*)newindexpath {     switch(type) {         case nsfetchedresultschangeinsert:             nslog(@"insertion @ row %d", newindexpath.row);             [self.table insertrowsatindexpaths:@[newindexpath]                               withrowanimation:uitableviewrowanimationnone];              break;  

now here problem: when new rows inserted, animated sliding "down". on infinite scroll upwards looks bad. happens regardless of whether pass uitableviewrowanimationnone, uitableviewrowanimationtop or uitableviewrowanimationbottom parameter - option seems ignored entirely.

any ideas how animate table properly?

please try below.

[catransaction setdisableactions:yes]; [self.table insertrowsatindexpaths:@[newindexpath] withrowanimation:uitableviewrowanimationnone]; [catransaction setdisableactions:no]; // reset original value 

Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -