2
콜렉션 셀이 있으며 터치했을 때 이미지를 변경하고 다시 돌아가고 싶습니다. 어떻게 구조화해야합니까?탭 콜렉션 뷰 셀 변경 이미지
강조 표시 한 후 (아래에서 잘 작동 함) 다시 터치하면 이전 이미지로 돌아가고 싶습니다. 고맙습니다. viewWillDissapear에서 어떤 셀이 강조 표시되는지 알고 싶습니다.
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
UIImage *backGround =[UIImage imageNamed:@"IconHighlight.png"];
UIImageView *av = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, backGround.size.width, backGround.size.height)];
av.backgroundColor = [UIColor clearColor];
av.opaque = NO;
av.image = backGround;
[[collectionView cellForItemAtIndexPath:indexPath] setBackgroundView:av];
[[collectionView cellForItemAtIndexPath:indexPath].backgroundView setTag:1];
}