UICollectionViewController があり、特定の画像をクリック/タップすると、通常の ViewController に「プッシュ」されるため、既にセルに画像が表示されています。それ、どうやったら出来るの?ここに私がこれまでに持っているコードがあります...選択した画像を他のView Controllerで開きたいのですが、助けてください
-(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView
{
return 1;
}
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
return [imagearray count];
}
-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier=@"Cell" ;
customcell *cell=[collectionView dequeueReusableCellWithReuseIdentifier:CellIdentifier forIndexPath:indexPath];
[[cell nyimage]setImage:[UIImage imageNamed:[imagearray objectAtIndex:indexPath.item]]];
return cell;
}