UICollectionView的多选
来源:互联网 发布:ae软件怎么下载 编辑:程序博客网 时间:2024/05/17 09:15
设置cell 是否是选中状态和所有选中的cell的数组
@property(nonatomic,strong)NSMutableArray *totalArr;
@property(nonatomic,assign)BOOL isSelected;
//点击选定
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
QDCollectionViewCell *cell = (QDCollectionViewCell *)[collectionViewcellForItemAtIndexPath:indexPath];
if ([_totalArrcontainsObject:cell]) {
cell.SelectedImage.image=[UIImageimageNamed:@""];
[_totalArrremoveObject:cell];
}else{
cell.SelectedImage.image=[UIImageimageNamed:@"选中"];
[_totalArraddObject:cell];
}
_isSelected=!_isSelected;
}
阅读全文
1 0
- UICollectionView的多选
- UICollectionView的单选
- UICollectionView 单选的实现
- UICollectionView 多选显示问题
- iOS UICollectionView 实现多选及取消
- IOS6- UICollectionView的使用
- ios UICollectionView 的用法
- ios UICollectionView的使用
- UICollectionView的HeaderView、FooterView
- UICollectionView的简单使用
- UICollectionView 的使用
- UICollectionView的使用
- UICollectionView的横线问题
- UICollectionView的使用
- UICollectionView的简单创建
- ios UICollectionView的使用
- [IOS]UICollectionView的使用
- UICollectionView的简单使用
- C# 结构体类型和类类型
- 已解决“pkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem”
- 在Linux系统下使用SSH实现端口映射的方法
- Python3.5+PyQt5多线程+itchat实现微信防撤回桌面版(一)
- 我的文章页是静态URL,可是游客却到不开显示404
- UICollectionView的多选
- MongoDB--数据库与Collection注意事项
- C/S架构和B/S架构的概念和区别
- kafka入门
- linux之nagios安装教程
- 机器学习18-XGBoost的推导过程
- web系统启动报错:mysql数据库连接many connection errors; unblock with 'mysqladmin flush-hosts' 解决方法
- 你在哪,现实就在哪
- Python3.5+PyQt5多线程+itchat实现微信防撤回桌面版代码(二)