神奇的 collectionview
2016-02-25 13:50
162 查看
1. 删除item
MoreCollectionViewCell * cell = (MoreCollectionViewCell *)button.superview.superview;
NSIndexPath * index = [self.myCollectionView
indexPathForCell:cell];
[dataArray
removeObjectAtIndex:index.row];
NSIndexPath *indexPath = [NSIndexPath
indexPathForItem:index.row
inSection:0];
NSArray *itemPaths =
@[indexPath];
[self.myCollectionView
deleteItemsAtIndexPaths:itemPaths];
MoreCollectionViewCell * cell = (MoreCollectionViewCell *)button.superview.superview;
NSIndexPath * index = [self.myCollectionView
indexPathForCell:cell];
[dataArray
removeObjectAtIndex:index.row];
NSIndexPath *indexPath = [NSIndexPath
indexPathForItem:index.row
inSection:0];
NSArray *itemPaths =
@[indexPath];
[self.myCollectionView
deleteItemsAtIndexPaths:itemPaths];
相关文章推荐
- oracle创建表
- 探究android:largeHeap
- Java基础:Day14笔记内容 ( StringBuilder类)
- poj 3468 A Simple Problem with Integers(线段树区间更新)
- Java基础07 包
- Nagios 监控系统架设全攻略
- ASP.NET Web API
- lintcode-easy-Insert Interval
- iOS 25个性能优化/内存优化常用方法
- Runtime Method Swizzling
- Memcached常用命令及使用说明
- 开发汉澳即时通信网,2006年上线,QQ死期到了
- 【云计算】docker三剑客如何支持分布式部署?
- Java 清除指定目录文件夹下文件
- 用idea生成可执行的jar文件
- iOS中跳转控制器隐藏底部tabBar
- 向前兼容和向后兼容
- muduo库的学习1---socket基本设计---总论
- Java 5 特性 Instrumentation 实践
- 蓝桥杯—格子中输出—详解