I have subclasses of each of the following: a UIViewController managing a UICollectionView. The cells in the UICollectionView contain custom subclassess of UICollectionViewCell. I am populating it UICollectionViewCell subclasses from CoreData in - (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath and all this works fine and dandy.
When the user selects a cell I pick this up in - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath and segue off to process the selected cell. This all works fine and dandy.
PROBLEM: I now want to have a checkbox on each of the UICollectionViewCells that the user can click to select the cell. After they have selected one or more cells I want them to press a UIButton on the top level UIView (managed by the UIViewController (that manages the UICollectionView) and I want a method in the UIViewController top "process" each of the selected cells one at a time. How do I communciate this info back up the line to the UIViewController?
I have a UIButton on my UICollectionViewCell (xib file) which has an outlet to the custom UICollectionViewCell. I have two images associcated with the button (unselected and selected). I toggle this in the UICollectionViewCell and this works fine. BUT when the button is pressed on the containing UIViewControllers view that says "PROCESS SELECTED ITEMS NOW" I can not see a way of communicating back to this level what was selected. Since there is a MANY to One relationship of UICollectionViewCells to the UICollectionView I can not just put an outlet from the UICollectionViewCell to the UIViewController.
It seems like such an obvious thing to want to do but I can not find any examples ??? Any help greatly appreciated.