2

This is for Xamarin.iOS

Sorry for confusion this is not for Objective-C but for C# Xamarin.iOS , I already had the tags for Xamarin.

It seems like its all over the internet from 2014 that ItemSelected is not triggered on UICollectionView. Is there a solution to this other than using TouchesBegan, TouchesEnded ?

I also noticed that CellDisplayingEnded() does not trigger either!!

Answering my own question: Instead of setting up a "Source" for the table view , I've set it as a "DataSource" by mistake and those methods were are never called.

2 Answers 2

5

Answering my own question. Instead of setting up a "Source" for the table view , I've set it as a "DataSource" by mistake and those methods are never called

0

It is possible with UICollectionViewDelegate method, The UICollectionViewDelegate protocol defines methods that allow you to manage the selection of items in a collection view. When user selects an item, the collectionView:didSelectItemAtIndexPath: method is invoked.

 -  (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ 
  }

This may help you

1
  • 1
    Sorry for confusion this is not for Objective-C but for C# Xamarin.iOS , I already had the tags for Xamarin. ItemSelected() Method is the equivalent to Objective-C didSelectItemAtIndexPath in Xamarin
    – iamIcarus
    Commented Jul 1, 2015 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.