Questions tagged [nscollectionview]

NSCollectionView is a NSView subclass which provides basic functionality for displaying, arranging, grouping and manipulating graphical representations of collections of objects.

NSCollectionView is a NSView () subclass which provides basic functionality for displaying, arranging, grouping and manipulating graphical representations of collections of objects.

Xcode 7 introduced a new API for NSCollectionView so that it can be implemented similarly to the iOS counterpart (UICollectionView). In OS X 10.11+ you can access NSCollectionView using its datasource and delegate protocols.

428 questions
6
votes
3 answers

Remove border from NSScrollView/NSCollectionView

As you can see in the screenshot below, the NSCollectionView I used has some kind of border (the thin gray lines) I want to get rid of. Can somebody tell me how to achieve this? I already tried subclassing the NSCollectionView and tried to overwrite…
Björn Kaiser
  • 9,882
  • 4
  • 37
  • 57
6
votes
4 answers

How do I get the representedObject from a view in an NSCollectionViewItem?

I have a view that gets used in each of my CollectionView's items. I have an IBOutlet to the CollectionViewItem from my view and I have that hooked up in Interface Builder. I want to access a value from the representedObject (which is a Core Data…
Austin
  • 4,638
  • 7
  • 41
  • 60
5
votes
0 answers

NSCollectionView size is wrong

NSCollectionView show a wrong size for the items when using the method " transition(from: to: options: completionHandler:)" to trans to the NSCollectionView's controller. If you change the window size ,it will be recover to right size. I don't know…
Jia Jia
  • 51
  • 3
5
votes
1 answer

Data-binding in a NSCollectionView

I've got a NSCollectionView for which I do have a dataArray and a selectedIndexes NSIndexSet defined in it's File's Owner. (Since I'm working with MonoMac on that project I've had some trouble working with a simple NSArrayController and so I decided…
flohei
  • 5,248
  • 10
  • 36
  • 61
5
votes
2 answers

How to create NSPasteboardWriting for Drag and Drop in NSCollectionView

I have a one-section collection view and would like to implement Drag and Drop to allow reordering of the items. The CollectionViewItem has several textviews showing properties form my Parameter objects. Reading the doc I need to implement the…
JFS
  • 2,992
  • 3
  • 37
  • 48
5
votes
1 answer

NSCollectionViewItem never instantiate

I'm a bit lost here: I created a button acting like a colorPicker: clicking on it shows a collectionView in a popover. I first did it with a nib fil containing a view + the collectionView (embedded in as scrollView + a clipView). The stuff works…
Joshua
  • 147
  • 1
  • 12
5
votes
3 answers

How do I programmatically select an object (and have that object show as selected) in the new NSCollectionView?

I have sucessfully implemented a 10.11 version of NSCollectionView in my Mac app. It displays the 10 items that I want, but I want the first item to be automatically selected when the app starts. I have tried the following in the viewDidLoad and…
Ferdinand Rios
  • 972
  • 6
  • 18
5
votes
1 answer

10.11 NSCollectionView: "could not load the nibName: NSCollectionViewItem in bundle NSBundle"

I want to use a NSCollectionView with the new API model from Swift according to https://developer.apple.com/library/mac/releasenotes/AppKit/RN-AppKit/#10_11CollectionView. Since I prefer doing as much as possible in IB, I want to use the Content…
Etan
  • 17,014
  • 17
  • 89
  • 148
5
votes
1 answer

NSCollectionView lazy-loading like behavior

I am trying to get lazy-loading like behavior from my NSCollectionView. (honestly I assumed it had it, like a UITableView - seems like an obvious omission?) Anyway, I am displaying images in the cells, and would like to load images as they are…
user441669
  • 1,054
  • 1
  • 10
  • 23
5
votes
2 answers

NSCollectionView Auto-Resize Subview with Auto-Layout

I am trying to achieve a stacked arrangement of simple NSViews, and for that I'm using an NSCollectionView bound to a Dictionary Controller. The result I have so far is below: The labels on the left are bound to the controller item keys and the…
insys
  • 1,288
  • 13
  • 26
5
votes
2 answers

Make NSCollectionView render items vertically

Is it possible to make the items in an NSCollectionView render top-down and then left-right instead of left-right and then top-down? To depict it visually, items are currently rendered in the following order: [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] I…
sohum
  • 3,207
  • 2
  • 39
  • 63
5
votes
5 answers

How do I implement a customized list in Cocoa?

I want to build a Cocoa App with a list of entries very similar to the ToDo list of Things.app (see the screencast). The question is whether I should use a TableView, a CollectionView or a WebView. I think it could work with all of them, but…
Christian
  • 1,027
  • 1
  • 13
  • 26
5
votes
1 answer

How I add a mouse right-down menu to the NSCollectionViewItem

I have a question.How I add a mouse right-down menu to the NSCollectionViewItem. As an attempt I alse use the Apple's demo app IconCollection.I tryed drag a NSMenu to the IconViewPrototype.xib and connect it to the view's menu outlet in IB.but when…
user1377049
  • 123
  • 1
  • 1
  • 5
4
votes
1 answer

Design issue: Core Animation, NSCollectionView and NSCollectionViewItems

I am struggling with a design issue: I have an NSCollectionView that contains several items (it's binded to an NSArrayController which is, in turn, binded to a NSManagedObjectContext). I have decided to draw the view for each single item…
Gian Marco Toso
  • 11,676
  • 5
  • 29
  • 38
4
votes
0 answers

Forbid arrows action in NSCollectionView

I'm newbe in macOS development that's why I'm not sure that I've formulated my question correctly. I have multiple NSCollectionView on screen. One of them is main and in other I can select rating, colors etc.. The problem is that when I select color…
Tabula Rasa
  • 183
  • 10
1 2
3
28 29