I assume your MultiSelectionContainerView
has a UICollectionView
ember in it , In your MultiSelectionContainerView
:
- (NSArray *)getSelection{
NSMutableArray *selectedItems = [[NSMutableArray alloc] init];
for (NSIndexPath *indexPath in [self.collectionView indexPathsForSelectedItems]){
YourCollectionViewCell *cell = [self.collectionView cellForItemAtIndexPath:indexPath];
[selectedItems addObject:cell.label.text];
}
return selectedItems;
}
EDIT:
You have to pass these layers level by level, like UIViewController
holds MultiSelectionContainerView
as property,MultiSelectionContainerView
holds MultiSelectionViewController
,and you implement my answer in MultiSelectionViewController.then you can access it via
[self. multiSelectionCV.multiSelectionVC getSelection]