0

I am new to Cocoa and Objective C. I was able to display collectionviewitems (each containing an image and a text) in NSCollectionView. But now I want to display collectionviewitems (each containing n no. of images and a text) where n is a variable that is known at runtime. Can someone help me how to go about it?

Samantha
  • 1
  • 1

1 Answers1

0

I am not sure I understand what you are trying to accomplish... you can customise the NSCollectionViewItem or even generate it at runtime by subclassing NSCollectionView and using (NSCollectionViewItem *)newItemForRepresentedObject:(id)object. Remember that if you do it binding the view and the object is your business. Another possibility, if you have a finite number of different views you want to show is here: https://stackoverflow.com/a/14699040/2028375

Community
  • 1
  • 1
Daniele Bernardini
  • 1,516
  • 1
  • 12
  • 29