search

Home  >  Q&A  >  body text

ios - UICollectionView reloadData 会闪一下

如题,collectionView 采用的FlowLayout。我在每次刷新和加载更多的时候,直接将数据添加到array里面,然后[collectionView reloadData]

但是这样会闪一下,请问如何让它很自然的把新的数据加进去啊

大家讲道理大家讲道理2773 days ago690

reply all(2)I'll reply

  • 黄舟

    黄舟2017-04-17 15:46:19

    Try adding an animation?

        [UIView animateWithDuration:0.25 animations:^{
            [collectionView reloadData]
        }];

    Recommended part-time jobs for engineers, click on my avatar for details

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 15:46:19

    Here is the solution: http://blog.csdn.net/ylgwhyh/...

    reply
    0
  • Cancelreply