-1

I am working on iOS application where I am displaying images in a grid using AQGridView Library, we initially display some images and as user scrolls down we load more, the issue we are facing is that as new data arrives and we call reloadData on gridview all images in gridview blink and then reappear, we are trying to remove that 1 sec blink because it looks very bad.

We observed the same behavior when we tried UITableView.

Undo
  • 25,519
  • 37
  • 106
  • 129
TilalHusain
  • 1,006
  • 5
  • 17
  • 36

1 Answers1

0

The AQGridView will take its time to reload and as much as you populate more data. The other option that AQGridView provides is that you begin updating grid and then add new cells from new Data that has been recently loaded. Here is how it can be done

Steps:

 //Begin Updates
1) [self.gridView beginUpdates];

2) for(int 1=0;i<[updatedData count];i++)
   {
    //add each element one by one using this function
    self.gridView insertItemsAtIndices: (NSIndexSet *) indices withAnimation: (AQGridViewItemAnimation) animation];
   }
3) [self.gridView endUpdates];
Quamber Ali
  • 2,170
  • 25
  • 46