Questions tagged [nscollectionviewflowlayout]
7 questions
8
votes
3 answers
Full width NSCollectionViewFlowLayout with NSCollectionView
I have a NSCollectionViewFlowLayout which contains the following:
- (NSSize) itemSize
{
return CGSizeMake(self.collectionView.bounds.size.width, kItemHeight);
} // End of itemSize
- (CGFloat) minimumLineSpacing
{
return 0;
} // End of…

Kyle
- 17,317
- 32
- 140
- 246
4
votes
4 answers
NSCollectionViewFlowLayout - left alignment
NSCollectionViewFlowLayout produces a layout with items justified on the right margin or, if the container is only wide enough for one item, centres items. I was expecting an alignment option, e.g. on the delegate, but am not finding anything in the…

Obliquely
- 7,002
- 2
- 32
- 51
2
votes
1 answer
NSCollectionViewFlowLayout collectionViewContentSize updates but the collection views frame doesn't update
I have multiple custom NSCollectionViewFlowLayouts some of which have a vertical direction and others that have a horizontal direction.
When setting the horizontal layout the collection views frame correctly sets the height and width based on the…

Chris
- 21
- 2
2
votes
1 answer
How to animate a relayout of NSCollectionViewLayout on bounds change?
I have a basic implementation of NSCollectionViewLayout very similar to NSCollectionViewFlowLayout:
It places item in a horizontal row. If there's not enough room, the next item is added to the next row and so on.
My question: how can I animate a…

Mark
- 6,647
- 1
- 45
- 88
2
votes
1 answer
Swift: collectionView cell
I create collectionView And I have 3 cells. I want to that my cells look like this for all screens in all device:
But I have this result for iPad.
How to fix it?
Update
I add collectionView in UIViewController. I have this constraints for…
user8559575
1
vote
1 answer
NSCollectionView with Dynamic Width Items Using Auto Layout
I'm building an NSCollectionView that scrolls horizontally with items that look something like this:
I have my NSCollectionView item defined in a .xib with auto layout constraints. The width of the item is defined by the width of the label plus the…

Clifton Labrum
- 13,053
- 9
- 65
- 128
0
votes
1 answer
NSCollectionViewAttributes not getting applied correctly with custom NSFlowLayout subclass
I'm currently working on an NSCollectionView with a custom layout. For that purpose, I subclassed NSCollectionViewFlowLayout to top-align my items (which all have a fixed width what made the algorithm pretty easy). The problem I have now is that…

Jan Z.
- 6,883
- 4
- 23
- 27