0
UICollectionViewCellImage를 선택할 때 UICollectionview 및 ImageView를 포함하는 응용 프로그램을 만들면 UIImageview에서 표시되고 UIBoltview에 UIButtton을 추가하여 UICollectionview로 돌아가지만 UICollectionview로 돌아 왔을 때 응답 없음. 제발 해결책을주세요.CollectionView 셀을 선택하면 UICollectionView가 응답하지 않습니다.
내 코드는 다음 imagecollection
- (void)viewDidLoad
{
self.zoomImage.hidden=TRUE;
}
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
self.zoomImage.hidden=FALSE;
NSDictionary *dict = [self.imagesa objectAtIndex:indexPath.item];
NSString *img=[dict valueForKey:@"link"];
[self.zoomImage sd_setImageWithURL:[NSURL URLWithString:img]];
self.imagecollection.hidden=TRUE;
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setFrame:CGRectMake(0,0,self.view.frame.size.width,self.view.frame.size.height)];
[btn addTarget:self action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:btn];
}
-(void)buttonPressed:(UIButton *)button
{
self.imagecollection.hidden=FALSE;
self.zoomImage.hidden=TRUE;
}
것은 내 UICollectionView하고 Zoomimage가있는 UIImageView입니다. 어떤 SolutionPossible 경우 나에게 해결책을주십시오.