UICollectionView 在实际开发中需要在模型Model里定义一个BOO值,来标记是否选中,根据选中状态来切换选中状态
如@property(nonatomic,assign) BOOL selected;
模拟数据:
在cellForItemAtIndexPath 里给cell 的model赋值 cell.model = model;
多选:
单选:
UICollectionView 在实际开发中需要在模型Model里定义一个BOO值,来标记是否选中,根据选中状态来切换选中状态
如@property(nonatomic,assign) BOOL selected;
模拟数据:
在cellForItemAtIndexPath 里给cell 的model赋值 cell.model = model;
多选:
单选:
本文标题:UICollectionView 实现多\单选
本文链接:https://www.haomeiwen.com/subject/tikeydtx.html
网友评论