title: Using a UICollectionView over an SKScene
body: <p>I have an app with several SKScenes. To keep it snappy, I have a single UIViewController, that handles 1 SKView. </p>
  
  <p>I'm trying to add a UICollectionView to one of the SKScenes. However the problem comes when I try to set the delegate for the collection view to the SKScene initialising it. </p>
  
  <p>I initialise it here: </p>
  
  <pre><code>- (id)initWithSize:(CGSize)size
  {
      if (self = [super initWithSize:size]) {
  
          //Initialise collectionView
          UICollectionViewLayout *layout = [[UICollectionViewLayout alloc] init];
          _collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, size.width, size.height) collectionViewLayout:layout];
          _collectionView.delegate = self;
          _collectionView.dataSource = self;
          [_collectionView setBackgroundColor:[UIColor redColor]];
      }
      return self;
  }
  </code></pre>
  
  <p>After initialising, I add the collection view as a subview of the UIViewController's view by calling:</p>
  
  <pre><code>- (void)didMoveToView:(SKView *)view
  {
      [self.view addSubview:_collectionView];
  }
  </code></pre>
  
  <p>But the delegate or datasource methods aren't called. I've set up the header: </p>
  
  <pre><code>@interface BrowseScene : SKScene &lt;UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout&gt;
  </code></pre>
  
  <p>I'm guessing that despite setting self as the delegate, once the collection view is added, it is added as a subview of the UIViewController's SKView, and therefore has no reference to the SKScene that initialised it. I tried calling: </p>
  
  <pre><code>_collectionView.delegate = self.view.scene;
  </code></pre>
  
  <p>But I get a compiler error saying SKScene is an incompatible type for  UICollectionViewDelegate. </p>
  
  <p>So my question is, how best to approach this? </p>