-1

我正在开发 iOS 应用程序,我正在使用 AQGridView 库在网格中显示图像,我们最初显示一些图像,随着用户向下滚动我们加载更多,我们面临的问题是,随着新数据的到来,我们在 gridview all 上调用 reloadData gridview 中的图像闪烁然后重新出现,我们正在尝试消除 1 秒的闪烁,因为它看起来非常糟糕。

当我们尝试 UITableView 时,我们观察到了相同的行为。

4

1 回答 1

1

它将需要时间来重新加载,AQGridView并且尽可能多地填充更多数据。提供的另一个选项AQGridView是您开始更新网格,然后从最近加载的新数据中添加新单元格。这是如何完成的

脚步:

 //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];
于 2013-06-25T13:54:47.130 回答