神奇的 collectionview

来源:互联网 发布:阿里云服务器如何退款 编辑:程序博客网 时间:2024/05/16 09:19

1. 删除item

 MoreCollectionViewCell * cell = (MoreCollectionViewCell *)button.superview.superview;

    NSIndexPath * index = [self.myCollectionViewindexPathForCell:cell];


    [dataArrayremoveObjectAtIndex:index.row];

    

    NSIndexPath *indexPath = [NSIndexPathindexPathForItem:index.rowinSection:0];

    

    NSArray *itemPaths =@[indexPath];

    

    

    [self.myCollectionViewdeleteItemsAtIndexPaths:itemPaths];


0 0
原创粉丝点击