4

In the storyboard, I have an NSCollectionView inside an View Controller Scene, and an Collection View Item Scene.

However, I have no idea how to link these two. I can't see anything in Interface Builder to link them.

The NSCollectionView class reference lists these two functions for registering items:

func register(AnyClass?, forItemWithIdentifier: String)
func register(NSNib?, forItemWithIdentifier: String)

When registering a class, the class is expected to have an init() without parameters. I have no idea how to write one that would instantiate one from the storyboard.

And I don't know how to get a Nib out of the storyboard.

I'm using NSCollectionViewFlowLayout, not the legacy variant with an item prototype.

I feel like I'm missing something obvious. Any help would be greatly appreciated.

thanks, dillo

Dieter Baron
  • 101
  • 3

0 Answers0