Questions tagged [nscollectionviewitem]
101 questions
1
vote
1 answer
NSCollectionViewItems don't reload when scrolling
I'm new to learning Objective-C and I have a problem with NSCollectionView which I couldn't find any ways to resolve it.
My problem is:
I wrote a button event to create a NSCollectionView named thoughtCollectionView and added onto my contentView to…

Nikita Lyu
- 67
- 2
- 8
1
vote
0 answers
Tab across different custom NSCollectionViewItem cells
Trying to find best way of handling data entry forms in my first macOS app.
Currently trying with NSCollectionView and custom cells for different layouts, such as label + one entry field, two labels + two fields, label + date entry, etc.
See image…

Patrick
- 59
- 5
1
vote
1 answer
Why does NSCollectionView.makeItem sometimes crash with EXC_BAD_ACCESS?
For some reason, my app just started doing this after months of not doing so. This popped up after a seemingly-unrelated use of OperationQueue (I always use main, so it's done on Thread 1).
As you can see, I call the exact same function 6 times in…

Ky -
- 30,724
- 51
- 192
- 308
1
vote
1 answer
NSCollectionViewItem has nil outlets in itemForRepresentedObjectAtIndexPath
I have an NSCollectionView that displays a bunch of items that are called "ImageCollectionViewItem"s. I have an ImageCollectionViewItem.xib file that solely has an NSView that covers the item. I want to be able to dynamically change what is in that…

connormurray7
- 43
- 5
1
vote
1 answer
Assertion failure when using NSCollectionView
I am currently developing an OS X application with Swift. I am trying to use an NSCollectionView in my main view, and so I have added an NSCollectionView object to my .xib file. I haven't changed anything in regards to that other than linking the…

Rohan
- 541
- 1
- 11
- 24
1
vote
1 answer
NSCollectionView does show nothing
I've tried to follow this guide:
Quick Start for Collection Views
using an NSImageView in the Collection View Item.
Nothing shows up, neither if i set the image with a Image Well neither if i set the array via code.
So i tried to do it…

Phoenix
- 181
- 3
- 13
1
vote
1 answer
NSButton binding to NSCollectionViewItem: representedObject?
When I pre-added a button to the NSCollectionViewItem's view, I can bind its action in the inspector:
Which works without problem.
Now I'd like to create that button programmatically within the view's mouseDown:, what should I assign to the bind:…

Cai
- 3,609
- 2
- 19
- 39
1
vote
1 answer
Popover segue from NSCollectionViewItem
TL;WR
What is the best way to popover-segue from a cloned view (NSCollectionViewItem)?
Good afternoon,
I'm trying to figure out how to segue from an itemPrototype, but it's not as straight-forward as I was hoping, and has tripped my up,…

Michael Bethke
- 170
- 4
- 17
1
vote
1 answer
How to create groups in NSCollectionView?
How to add sections to NSCollectionView?

abg
- 2,002
- 7
- 39
- 63
1
vote
1 answer
Cocoa - How to change the size of NSCollectionViewItem and layout programmatically?
I want to change the layout of the NSCollectionView programmatically with 3 buttons, each button will change the layout of the collection view - 2, 3, 4 columns per row. And the NSCollectionViewItem size has to be auto-resized.
I tried searching all…

Jun
- 3,422
- 3
- 28
- 58
1
vote
1 answer
NSCollectionViewItem with a custom view
I've been struggling with trying to create an NSCollectionView that has a set of NSCollectionViewItems with a custom view. The code works fine when the controls on the item view are standard AppKit controls, but once I add a custom NSView, there's…

Steven Palmer
- 300
- 2
- 12
1
vote
1 answer
want to remove a specific collectionview item with the remove button on that view
I have a collection view item and its prototype view. Within that prototype view I have a little x button. I want that button to remove the exact collection view item that it is on top of.
I can remove a selected item if I click on the space…

theprojectabot
- 1,163
- 12
- 19
1
vote
2 answers
Cocoa- Using representedObject for NSButton in NSCollectionView
Setup
I have a NSCollectionView. I have a checkbox in the View Prototype. I've successfully set up bindings so the Card Title and action get populated. (image 1, below)
Goal
I'd like, when I click the checkbox, to run a function that accesses the…

ryantuck
- 6,146
- 10
- 57
- 71
1
vote
0 answers
NSCollectionView dont animate reordering
I'am updating the item size of my collection items with a slider
NSSize size = NSMakeSize(ratio, ratio);
[collectionView setMinItemSize:size];
[collectionView setMaxItemSize:size];
However i don't want the reorder animation to happen (the cells…

Peter Lapisu
- 19,915
- 16
- 123
- 179
1
vote
1 answer
Redrawing NSCollectionView on Scroll Causes Breakup of Graphics
I have a minor irritant in an NSCollectionView in which the NSCollectionViewItem's break up visually when I scroll the window.
The rate of breakup depends upon the rate of scrolling. For example, if I scroll slowly the breakup occurs more often.…

Hooligancat
- 3,588
- 1
- 37
- 55