Questions tagged [collectionview]

The Marionette CollectionView displays a Backbone collection object by rendering each objects through the specified childView View object.

Docs

1294 questions
15
votes
3 answers

Set rounded corners on UIimage in UICollectionViewCell in swift

I have a simple problem that I cannot find a solution to on google, the docs or here. I have a Collectionview in my view controller. I have created a custom cell, DescriptionCell, that contains a UIImage. I want this image to have rounded corners.…
Jell92
  • 183
  • 1
  • 2
  • 6
14
votes
2 answers

CollectionView duplicate cell when loading more data

The problem: I have a CollectionView which loads a UIimage into each cell. However my problem is that when I load additional cells with more images they appear to duplicate. I can't quite see what could be causing this in my code. Might it be…
Mat0
  • 1,165
  • 2
  • 11
  • 27
13
votes
3 answers

Stuck understanding how to create a table with multiple columns in iOS Swift

I've spent the better half of the day so far researching and trying to understand how to make a table with multiple columns. Embarrassingly, I am still quite new to Swift and programming in general so a lot of the stuff I've read and found aren't…
Matty
  • 343
  • 1
  • 5
  • 16
12
votes
4 answers

How to create customized UICollectionView with 2 or more custom cells?

in my project I want to use UICollectionView with custom cells, I created collection view with custom cells but I want to use Different size of custom cell in my project I followed some tutorials but I din`t get it properly, and below I attached…
Shanmugasundharam
  • 2,082
  • 23
  • 32
10
votes
3 answers

Filtered CollectionView Gives Wrong Count

According to the documentation, the Count of a filtered CollectionView should only be the count of items that pass the filter. Given this code: List testList = new…
David Mullin
  • 688
  • 1
  • 8
  • 21
10
votes
6 answers

Swift viewWillTransition not called

I'm creating a full screen image gallery using a UICollectionView. When the user rotates the device, I perform updates to the UICollectionView within func viewWillTransition(to size: CGSize, with coordinator:…
10
votes
2 answers

swift iOS - UICollectionView images mixed up after fast scroll

I am new to swift and iOS programming, but I have been able to build a mostly stable starting interface for my application in Xcode. The CollectionView grabs an image and text from an array of dictionaries created from a csv file on my home network…
shadowofjazz
  • 117
  • 1
  • 5
10
votes
3 answers

2 different cell sizes in UICollectionView Objective C

I would like to use UICollectionView, it is possible to create the following layout: As you can see, there are two different sizes of the cell. One is 1/4 of the row, the other is 3/4. Is it possible to create this kind of layout with a…
Yvonne
  • 113
  • 1
  • 1
  • 6
10
votes
1 answer

How does binding to collections really work?

Well, I'm confused. If my control has dependency property ItemsSource of IEnumerable type and user binds collection to it what object do I have in DependencyPropertyChangedEventArgs.NewValue? As far as I know CollectionView is implicitly created for…
Pavel Voronin
  • 13,503
  • 7
  • 71
  • 137
10
votes
7 answers

WPF DataGrid ignores SortDescription

I've got a strange problem here regarding sorting of a WPF DataGrid (System.Windows.Controls.DataGrid in .NET 4.0). Its ItemsSource is bound to a property of the datacontext object:
Hendrik Wiese
  • 2,010
  • 3
  • 22
  • 49
9
votes
1 answer

CollectionView Compositional Layout with Multiple Data Types

I was playing around with Compositional Layouts with Diffable DataSource and so far loving it. But all of my endeavors have included a single type of Data Item. What I'm trying to achieve is have two different types of List, say Car and Airplane So…
n1schal
  • 91
  • 3
9
votes
1 answer

when using subclassed collectionViewFlowLayout I'm getting weird error

I made a subclass of collectionViewFlowLayout. After that, I implemented the following code: override func finalLayoutAttributesForDisappearingItemAtIndexPath(itemIndexPath: NSIndexPath) -> UICollectionViewLayoutAttributes? { let attr =…
potato
  • 4,479
  • 7
  • 42
  • 99
8
votes
0 answers

UICollectionView self sizing cells. Insert/reloadData breaks layout

Writing this question as my last resort, being stuck on this for few days now. I am trying to implement self sizing cells for UICollectionView with FlowLayout. Everything seem to work fine until I reladData() or do insertItemsAtIndexPaths() while…
7
votes
1 answer

How do GroupStyles work?

I have a ListView Control bound to a ListCollectionView in a ViewModel. I wanted to try to group these items but having some problems. I set the Property grouping in the VM to begin with and then added a…
Ingó Vals
  • 4,788
  • 14
  • 65
  • 113
7
votes
4 answers

How to get indexpath from row index Swift

I am loading an array to UIcollectionview(later will add other data) . I want to select collection view item randomly as: var indexpath = Int(arc4random_uniform(UInt32(items.count)-1) self.collectionview.selectitem(at: **indexpath**, animated:true…
Saira Nawaz
  • 710
  • 2
  • 10
  • 24
1
2
3
86 87