Ios6 UICollectionView可选择两个图像,一个在另一个上

Ios6 UICollectionView可选择两个图像,一个在另一个上,ios6,uicollectionview,Ios6,Uicollectionview,当我从我的CollectionView(在弹出框中)选择一个单元格时,我有一个显示图像的mainView(使用故事板、ImageView和CollectionView) 如何创建另一个(包含UiCollectionView的popover),让我选择一个图像并将第二个图像放置在已经显示的图像的顶部 #pragma mark - UICollectionViewDataSource - (NSInteger)numberOfSectionsInCollectionView:(UICollecti

当我从我的CollectionView(在弹出框中)选择一个单元格时,我有一个显示图像的mainView(使用故事板、ImageView和CollectionView)

如何创建另一个(包含UiCollectionView的popover),让我选择一个图像并将第二个图像放置在已经显示的图像的顶部

#pragma mark - UICollectionViewDataSource

- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView
{
    // Return the number of sections.
   // return [_carImages count] / 2;
    return 1;
}






- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
    // Return the number of rows in the section.
    return [_carImages count];
}








- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{

  //  CellTasteCollectionView *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPath];
   // image = [[UIImage imageNamed:[_carImages objectAtIndex:indexPath.row]];
  //  cell.imageView.image = image;

   // return cell;

    NSLog(@"INDEX PATH roe %@",[_carImages objectAtIndex:indexPath.row]);

    UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPath];
/*




 UIImageView *brickAnim = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile: imageFilePath]];
 brickAnim.frame = CGRectMake(0, 0, 62, 57);
 [cell.contentView addSubview:brickAnim];
 cell.layer.borderColor=[UIColor whiteColor].CGColor;
 cell.layer.borderWidth=2.0;
  */  cell.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:[_carImages objectAtIndex:indexPath.row]]];
    return cell;

   /* MyCollectionViewCell *myCell = [collectionView
                                    dequeueReusableCellWithReuseIdentifier:@"MyCell"
                                    forIndexPath:indexPath];

    UIImage *image;
    int row = [indexPath row];

    image = [UIImage imageNamed:_carImages[row]];



    myCell.imageView.image = image;

    return myCell;*/
}







- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
  //  UIImage *image =[UIImage imageNamed: [_carImages objectAtIndex:indexPath.row]];
    return CGSizeMake(40, 40);
}

- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section {
   return UIEdgeInsetsMake(20, 20, 20, 20);
}




#pragma mark -
#pragma mark UICollectionViewFlowLayoutDelegate





/*-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
{
    UIImage *image;
    int row = [indexPath row];

    image = [UIImage imageNamed:_carImages[row]];

    return image.size;
}*/






- (void)selectItemAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated scrollPosition:(UICollectionViewScrollPosition)scrollPosition{


}