仿支付宝应用编辑

项目新的需求。然后查到有类似的Demo类似于支付宝首页对应用进行编辑,排序添加删除的功能

根据需求稍微丰富了了一下,详情看Demo

1.HeaderView只允许注册,
2.HeaderView错乱, 因为未区分头尾部

This method must always return a valid view object. If you do not want a supplementary view in a particular case, your layout object should not create the attributes for that view. Alternatively, you can hide views by setting the hidden property of the corresponding attributes to YES or set the alpha property of the attributes to 0. To hide header and footer views in a flow layout, you can also set the width and height of those views to 0.
3.将cell添加到collectionView上 会被header遮住。 最后没解决就选择放在View上。坐标做一下调整就可以了。
4.cell位置错乱,因为改写了YDCollectionViewFlowLayout。。之前为了解决间距问题重写了FlowLayout 但是判断条件不够严谨。

你可能感兴趣的:(仿支付宝应用编辑)