我正在尝试使用此代码,但它不起作用:
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
printf("Selected View index=%d",indexPath.row);
UICollectionViewCell *cell = [self.collectionView dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPath];
cell.selectedBackgroundView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"blue_s.png"]];
//[self.collectionView reloadData];
}
如何更改在 aUIImage
中选择UICollectionViewCell
的UICollectionView
?