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
0
votes
1 answer

Clear example and best approach to NSCollectionView

I looked for this on the web, but I could not find any clear tutorial on how to successfully implement an NSCollectionView. How should I proceed? In Interface Builder, I can drag an NSCollectionView to the main view, and I see that there are two…
Donovan
  • 6,002
  • 5
  • 41
  • 55
0
votes
1 answer

NSCollectionView does not hide in osx

I used NSCollectionView in my application. In certain condition i want to hide and Unhide the NSCollectionView. But it will not hide the NSCollectionView. I used the following code @IBOutlet weak var thumbnailView: NSCollectionView! func…
Rizwan Shaikh
  • 2,824
  • 2
  • 27
  • 49
0
votes
1 answer

How to update NSCollectionViewItem when data model change?

I have a NSArrayController bound to a NSCollectionView. My data model is a class Person. Inside Person is a timer that will change the property age every second. In my NSCollectionViewItem I have a NSLabel bound to representedObject.age. When the…
TalkingCode
  • 13,407
  • 27
  • 102
  • 147
0
votes
1 answer

Data binding / NSArrayController: What is the job of the Object Controller

Every tutorial I read about data binding / NSArrayController told to set the Mode and the Keys in the Object Controller (Attributes Inspector) for the data model class I use. Why do I have to do this? In my sample application I create all objects in…
TalkingCode
  • 13,407
  • 27
  • 102
  • 147
0
votes
1 answer

How can I make NSCollectionView finish drawing before the view containing it is made visible?

I'm trying to clean up the UI on my application (built for 10.5) and one thing that's rather annoying is that when I swap to the library I reload the contents and the nscollectionview that displays the items fades the old content out before fading…
Septih
  • 1,436
  • 17
  • 40
0
votes
1 answer

Change background image of a button programmatically cocoa obj-c

I am creating NSCollection View (in Cocoa) with many identical buttons in size and appearance, except for their icons (or you could probably call them Background Images). In my xib file I have the button binded to the Collection View (Model key…
0
votes
1 answer

Changing collectionview button's image in Cocoa

Tools: xCode, Objective-C, Mac, Cocoa Purpose: I am creating a collection view with many buttons. Each button opens a file in a folder and each of them has a background picture of the file (for example: jpeg file) so it looks like what you would…
0
votes
1 answer

How to combine nsobject file and nscollectionviewcontroller to viewcontroller in xcode or nscollectionviewcontroller to viewcontroller only

I am download and use this Instagram feed here. But i don't want switch more view. In my app touch a instagram feed button then switch a view and then i am doing some view appearance so i want to combine SBInstagramController and…
Mathi Arasan
  • 869
  • 2
  • 10
  • 32
0
votes
1 answer

Is that possible to make a NSProgressIndicator spin while NSCollectionView is binding massive data?

I have a NSCollectionView and it need load about 1000 items (item only contains text, no image or other rich stuff). I wanted to put a spinning NSProgressIndicator on the UI to let users know it is working, but found the indicator appear on UI and…
Will
  • 676
  • 6
  • 14
0
votes
1 answer

NSCollectionView Swift

I have an iOS app that uses a UICollectionView. I am now creating the app for Mac so I am trying to use NSCollectionView however I am not sure where I should start. I am trying to add the code below but it does not seem to be available. Where am I…
Tom Coomer
  • 6,227
  • 12
  • 45
  • 82
0
votes
1 answer

Develop an iPhoto-like cocoa app for mac OSX

I plan to develop a mac OSX app that has a UI similar to that of iPhoto - a panel on the left and a grid view of images on the right. I am thinking of using NSSplitView to create two panels and using NSCollectionView for the grid. I guess this must…
0
votes
1 answer

Get represented object in NSCollectionView Item View action

Here's what I have: An NSCollectionView Populated via an NSArrayController Each 'item' (NSCollectionViewItem) shows its content in an attached view This view contains an NSButton Now, the question: When the user clicks the button, how could I tell…
0
votes
1 answer

Click on NSCollectionView returns always the same object

I' ve a NSCollectionViewItem subclass, called MyItem used as item of my NSCollectionView. I need to enumerate all the item in my collection view to set the delegate for each item with this code: NSUInteger categoryNumber =…
Luca
  • 1,704
  • 3
  • 29
  • 42
0
votes
1 answer

Get selected object in ArrayController from it's represented NSCollectionView item

Some days, I just want to bash my head against the wall. This is especially true when dealing with Cocoa and Apple's super generic documentation. (Apple's documentation is actually really good, I'm just angry that I can't figure this out) Okay, so I…
user2554650
0
votes
1 answer

Drawing issues after subclassing NSCollectionView

OK, here's what I have done: I have an NSCollectionView I wanted to be able to enable "selecting" items, and drawing a custom border when an items is selected I subclassed NSCollectionViewItem (to enable selection) I subclassed NSView for the…
Dr.Kameleon
  • 22,532
  • 20
  • 115
  • 223