द्वारा UICollectionView सेल का चयन मैं UICollectionView
उपयोग कर रहा हूँ images.I लोड करने के लिए एक छवि gallery.I UICollectionView
सेल के अंदर UIImage
इस्तेमाल किया उत्पन्न करने के लिए लंबे समय से प्रेस (नहीं एक टैप द्वारा) द्वारा UICollectionView
सेल का चयन करने की जरूरत है।आईओएस: लंबे प्रेस
- (IBAction)longPress:(UILongPressGestureRecognizer *)gestureRecognizer
{
UICollectionViewCell *cell=(UICollectionViewCell *)[gestureRecognizer view];
int index=cell.tag;
OverlayImage = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, cell.frame.size.width, cell.frame.size.height)];
OverlayImage.image = [UIImage imageNamed:@"[email protected]"];
[cell addSubview:OverlayImage];
}
आप 'UILongPressGestureRecognizer 'का उपयोग कर सकते हैं – Exploring