Note that there are some explanatory texts on larger screens.

plurals
  1. POUICollectionview allows multipleSelection not working xcode
    text
    copied!<p>How to select the <code>Collection View</code> cell images using allows multiple selection is not working. Please suggest me idea or links</p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; NSLog(@"photo viewer"); [self.collectionView setPagingEnabled:NO]; self.collectionView.allowsSelection=YES; [self.collectionView registerClass:[CWPhotoGalleryCell class] forCellWithReuseIdentifier:CWPhotoGalleryCellIdentifier]; [self.collectionView scrollToItemAtIndexPath:self.selectedIndexPath atScrollPosition:UICollectionViewScrollPositionRight animated:YES]; } -(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { return 1; } -(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection: (NSInteger)section { return [self.imageArray count]; } -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { CWPhotoGalleryCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:CWPhotoGalleryCellIdentifier forIndexPath:indexPath]; cell.navigationControllerContainer = self.navigationController; ALAsset *photo = [self.imageArray objectAtIndex:indexPath.row]; ALAssetRepresentation *rep = [photo defaultRepresentation]; CGImageRef ref = [rep fullScreenImage]; UIImage *img = [[UIImage alloc] initWithCGImage:ref]; cell.image = img; NSLog(@"clicked"); return cell; } -(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { return self.view.bounds.size; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload