title: Xamarin.iOS UICollectionView with custom UICollectionViewSource crashes
body: <p>I try to manage an UICollectionView  inside an UIControllerView in Xamarin.iOS.
  I tried many things, like this : <a href="https://developer.xamarin.com/guides/ios/tvos/user-interface/collection-views/" rel="nofollow noreferrer">https://developer.xamarin.com/guides/ios/tvos/user-interface/collection-views/</a> or this : <a href="https://www.youtube.com/watch?v=W4H9uLjoEjM" rel="nofollow noreferrer">https://www.youtube.com/watch?v=W4H9uLjoEjM</a></p>
  
  <p>Finally, I followed this tutorial : <a href="https://forums.xamarin.com/discussion/11274/how-to-setup-uicollectionview-datasource" rel="nofollow noreferrer">https://forums.xamarin.com/discussion/11274/how-to-setup-uicollectionview-datasource</a></p>
  
  <p>But I'm still blocked. My App crash when it tries to display the UIViewController with this error : <code>[Gotago_iOS_CollectionViewSource_ViewSourceListProgram collectionView:cellForItemAtIndexPath:]: unrecognized selector sent to instance 0x7af49db0'</code></p>
  
  <p>Here is my code... Any help please ?</p>
  
  <pre><code>public partial class ViewControllerListProgram : UIViewController
  {
      private ViewSourceListProgram m_viewSource; 
  
          public ViewControllerListProgram(IntPtr handle)
              : base(handle)
          {
          }
  
          public override async void ViewDidLoad()
          {
              base.ViewDidLoad();
  
              AppDelegate.CurrentViewController = this;
  
              ApiController_GetListConseilCircuit apiCtrl = new ApiController_GetListConseilCircuit();
  
              m_collectionView.RegisterClassForCell(typeof(CellListProgram), CellListProgram.Id);
              m_viewSource = new ViewSourceListProgram(await apiCtrl.OnlineGetListConseilCircuit());
              m_collectionView.Source = m_viewSource;
          }
      }
  
  
  
  public class ViewSourceListProgram : UICollectionViewSource
      {
          public List&lt;ApiController_GetListConseilCircuit.ConseilCircuit&gt; m_lsCircuits;
  
      public ViewSourceListProgram(List&lt;ApiController_GetListConseilCircuit.ConseilCircuit&gt; lsCircuits)
      {
          m_lsCircuits = lsCircuits;
      }
  
      public override nint NumberOfSections(UICollectionView collectionView)
      {
          return 1;
      }
  
      public override nint GetItemsCount(UICollectionView collectionView, nint section)
      {
          return m_lsCircuits.Count;
      }
  
      public override bool ShouldHighlightItem(UICollectionView collectionView, Foundation.NSIndexPath indexPath)
      {
          return true;
      }
  
      public override void ItemHighlighted(UICollectionView collectionView, Foundation.NSIndexPath indexPath)
      {
          CellListProgram cell = (CellListProgram)collectionView.CellForItem(indexPath);
  
          Toast.MakeText("Cell highlighted", Toast.LENGTH_LONG).Show();
      }
  
      public override void ItemUnhighlighted(UICollectionView collectionView, Foundation.NSIndexPath indexPath)
      {
          CellListProgram cell = (CellListProgram)collectionView.CellForItem(indexPath);
  
          Toast.MakeText("Cell unhighlighted", Toast.LENGTH_LONG).Show();
      }
  
      public UICollectionViewCell GetCell(UICollectionView collectionView, NSIndexPath indexPath)
      {
          CellListProgram cell = (CellListProgram)collectionView.DequeueReusableCell(CellListProgram.Id, indexPath);
  
          ApiController_GetListConseilCircuit.ConseilCircuit circuitOrProgram = m_lsCircuits[indexPath.Row];
  
          return cell;
      }
  }
  
  
  public partial class CellListProgram : UICollectionViewCell
      {
          public static readonly NSString Id = new NSString("programCell");
      public CellListProgram (IntPtr handle) : base (handle)
      {
      }
  }
  </code></pre>