ios - UICollectionView layout overlap -
hi using uicollectoinview first time. want show 2 layouts 1 normal add(import) images , 1 edit mode delete , reorder images. done works if import or delete images hidden cells(not show) overlay normal cells behind edit cell, behind cell not present in datasource(extra cell) came.
this remove , insert code.
// insert collectionview cell
**[self.collectionview insertitemsatindexpaths:[[nsarray alloc]initwithobjects:path, nil]];** // remove collectionview cell
**[self.collectionview deleteitemsatindexpaths:[[nsarray alloc]initwithobjects:indexpath, nil]];** // change layout
[editlayout invalidatelayout]; [self.collectionview setcollectionviewlayout: editlayout animated:yes];
thanks 1 me. how can prevent situation.
Comments
Post a Comment