1
항목을 CollectionView로 탭하면 문제가 있습니다.didSelectItemAtIndexPath가 정상적으로 작동하지 않습니다.
didSelectItemAtIndexPath는 항목을 누를 때 호출되지 않습니다. 항목을 보관할 때만이 메서드를 실행하십시오.
이것은 구현 방법입니다.
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
NSLog(@"did select at index path %@", indexPath);
_magazine = [[AppController instance] magazines][indexPath.row];
[self loadEditionsForMagazine:_magazine];
_magazineEditionsView.hidden = NO;
}
내 CollectionView가 데이터 소스 및 대리인에 연결되어 있습니다.
감사합니다.