There are many things wrong with your didSelectRow...
method.
- The method has an
indexPath
parameter - Your check to compare the index path is all wrong
- Use an array
Try this:
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
NSString *segue = segues[indexPath.row];
[self performSegueWithIdentifier:segue sender:self];
}
Add an instance variable for segues
as NSArray *segues;
.
Then in viewDidLoad
you can initialize it:
segues = @[ @"toPersonnel", @"toEquipment", @"toTasks" /* and the rest */ ];