UICollectionView insert cells above maintaining position (like Messages.app)

后端 未结 20 2103
渐次进展
渐次进展 2020-12-02 07:23

By default Collection View maintains content offset while inserting cells. On the other hand I\'d like to insert cells above the currently displaying ones so that they appea

20条回答
  •  难免孤独
    2020-12-02 08:23

    I did this in two lines of code (although it was on a UITableView) but I think you'd be able to do it the same way.

    I rotated the tableview 180 degrees.

    Then I rotated each tableview cell by 180 degrees also.

    This meant that I could treat it as a standard top to bottom table but the bottom was treated like the top.

提交回复
热议问题