Questions tagged [uicollectionviewflowlayout]

209 questions
1
vote
0 answers

UICollectionViewCell dashed border for dynamic cell width swift issue

Using UICollectionView under the UITableViewCell Using below extension for creating dashed border: extension UIView { func addDashedLineView(frame: CGRect) { let border = CAShapeLayer() border.strokeColor =…
0
votes
2 answers

How to set custom UICollectionView Cell Size

Hi Community I wanted to implement a UICollectionviewCell which have size of 110 and each row have 3 cells initially 1.) Now need to do some modification in such way firstRow should have 3 cells but the second should have 2 cells 2.) The first cells…
0
votes
1 answer

Resizable UICollectionCell by Pan Gesture

I want to resize the collection cell by dragging its edge. What is the best possible way? Currently, I am changing the current cell width manually. but it disrupts other cells and if I invalidate layout or reloadcollection() then it cause huge…
0
votes
0 answers

Is there a library or has anyone implemented apple photos pinch to change grid column numbers in iOS

In the photos app when you pinch on the grid, the number of column changes accordingly and also the cells update when pinch is in progress. It also allows to zoom into grid at any part of the grid. Does anyone know how to achieve this kind of…
0
votes
0 answers

UICollectionView minimumLineSpacing bug

I'm creating a horizontal scroll view through the collection view. I used flowlayout for layout, and I set the scroll direction to horizontal. I found a bug in this situation. If the width of the item is different, line spacing is not applied, but…
0
votes
1 answer

How to fix "UICollectionViewFlowLayout is not defined" when keyboard comes and goes

The full message is: The behavior of the UICollectionViewFlowLayout is not defined because: the item height must be less than the height of the UICollectionView minus the section ... In may situation, a horizontal collection view fill the bottom of…
David H
  • 40,852
  • 12
  • 92
  • 138
0
votes
3 answers

Collectionview cell not aligning with collectionview frame

I am trying to create a fullscreen collection view cell. The collection view is pinned to the edges of the parent view. But the collectionview cells are not aligning with the collectionview frame which is required. Can somebody help? View…
0
votes
0 answers

Need Header on Top and separator at section end for Horizontal UICollectionView

I am implementing horizontal UICollectionView I need a header on the Top and a separator at the end of section, where section > 0 Tried using flow layouts, having trouble of assigning different layout attribute for separator and header view…
0
votes
0 answers

Customize the UICollectionViewLayout of superimposed cells by sliding left and right

How to customize a UICollectionViewLayout with 4 items in the middle, and when sliding, more than 4 left and right cells can overlap, which can support inserting, deleting, and refreshing an item data,like this:
0
votes
0 answers

Horizontal UICollectionViewCompositionalLayout with next cell hint

I'm experimenting with UICollectionViewCompositionalLayout and trying to achieve a similar effect to the Apple Music app, especially to the "hint" indicating there are more cells to scroll: So far, I have managed to make a similar grid, but I can't…
0
votes
1 answer

Collection view automatic height change

Is it possible to automatically change the height of the collection view in relation to the item size. I get the data from the backend and in that data is the configuration for the items. I can adjust the size of the item but I don't know how to…
0
votes
1 answer

Swift UICollectionViewCell Item Mixing... Video of the problem is available

My problem video: https://streamable.com/2vrdbu As you move around the "Collection View" the objects move around and the assignment doesn't work properly. I tried many methods, but I could not achieve successful results. Code…
0
votes
1 answer

Is there an equivalent to sizeForItemAt IndexPath but for UICollectionviewCompositionalLayout?

I'm tasked with modifying one of our horizontal collectionViews so that it supports 2 possible cell widths based on the value of one of the properties of the item at that indexPath. This is rather simple to implement using…
0
votes
0 answers

How Collectionview´s decorationview appearing wothout delay

A decorationview should appear for each section in my flowlayout, which works. But when I scroll down, the decoration view sometimes only appears when row 0 appears. Of course, because of (if decatts.indexPath.row == 1). But if I don't use the If…
0
votes
1 answer

How to make a horizontal UICollectionView have the same spacing between dynamic cells

I have a dynamic collectionView, and essentially the spacing between cells needs to be the same regardless the width of the cell. Found similar answers here and on the internet, but all were for vertical scrolling collectionViews. So, I went on and…
ED.
  • 29
  • 4