ios - Tableview reload data not working when using afnetworking 2? -


this question exact duplicate of:

afhttprequestoperationmanager *manager = [afhttprequestoperationmanager manager]; manager.requestserializer = [afjsonrequestserializer serializer]; manager.responseserializer.acceptablecontenttypes = [nsset setwithobject:@"text/html"]; [manager get:[nsstring stringwithformat:@"%@%@",tic_url,@"list_messages.php"] parameters:params success:^(afhttprequestoperation *operation, id responseobject)  {      nslog(@"responseobject %@",responseobject);      if (![[responseobject valueforkey:@"status"] isequaltostring:@"0"]) {          marrchat = [responseobject valueforkey:@"data"];           [self.tblchat reloaddata];            if (marrchat.count > 0)          {              [self.tblchat scrolltorowatindexpath:[nsindexpath indexpathforrow:marrchat.count-1 insection:0] atscrollposition:uitableviewscrollpositionbottom animated:yes];          }       }        failure:^(afhttprequestoperation *operation, nserror *error)  {      nslog(@"error %@",error);      [commonfunctions shownonetworkerror];      hidehud;  }]; 

write [self.tblchat reloaddata]; in main queue.

    dispatch_sync(dispatch_get_main_queue(), ^{     [self.tblchat reloaddata];  }); 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -