我想在UICollectionView中使用滑动手势来选择多个单元格,如何实现这一点?
谢谢
使用UIPanGestureRecognizer和allowsMultipleSelection解决问题
UIPanGestureRecognizer *panning = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(handlePanning:)];
panning.minimumNumberOfTouches = 1;
panning.maximumNumberOfTouches = 1;
[self.storeLayoutGrid addGestureRecognizer:panning];发布于 2013-09-23 05:50:14
使用滑动选择多个单个单元格。那么答案是肯定的。使用手势识别器并将单元格设置为selected = YES。将手势识别器添加到单元格中,并确保您的集合视图启用了multipleSelection。
https://stackoverflow.com/questions/18952431
复制相似问题