UICollectionview ermöglicht die Mehrfachauswahl nicht funktioniert xcode

So wählen Sie die Collection View Zelle-Bilder verwenden ermöglicht die Mehrfachauswahl funktioniert nicht. Bitte schlagen Sie mich Idee oder links

- (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];
     }
InformationsquelleAutor user241641 | 2013-11-20
Schreibe einen Kommentar