i've connected a push segue from my collectionViewCell to a viewController in storyboard, but when a cell is clicked nothing happens. What do i do in order to accomplish this?
prepareForSegue
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.identifier isEqual:@"toHomeProfile"])
{
HomeProfileViewController * dvc = segue.destinationViewController;
self.selectedIndexPath = [[self.collectionView indexPathsForSelectedItems] firstObject];
dvc.imageArray = [[NSMutableArray alloc]init];
dvc.imageArray = [imageDic objectAtIndex:self.selectedIndexPath.item];
}
}
viewDidLoad
- (void)viewDidLoad
{
[super viewDidLoad];
CHTCollectionViewWaterfallLayout *layout = [[CHTCollectionViewWaterfallLayout alloc] init];
layout.sectionInset = UIEdgeInsetsMake(5, 5, 5, 5);
layout.headerHeight = 0;
layout.footerHeight = 0;
layout.minimumColumnSpacing = 5;
layout.minimumInteritemSpacing = 5;
self.collectionView.collectionViewLayout = layout;
_collectionView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
_collectionView.dataSource = self;
_collectionView.delegate = self;
_collectionView.backgroundColor = [UIColor whiteColor];
[_collectionView registerClass:[CHTCollectionViewWaterfallCell class]
forCellWithReuseIdentifier:CELL_IDENTIFIER];
}