Questions tagged [uicollectionviewflowlayout]

209 questions
0
votes
1 answer

How to show two items in one row? with using uicollectionView

I followed this video for study Collection View (https://www.youtube.com/watch?v=jQ8EUsQZJ5g) And I wrote code like this : if ( CollectionViewFlowLayout == nil ){ let numberOfItemsForRow : CGFloat = 2 let UpDownSpace : CGFloat = 5 …
0
votes
1 answer

How to fix UICollectionView - All cells disappear - Xamarin ios

I am using a UICollectionView in C# Xamarin ios and sometimes all of the cells will disappear from the screen. This happens normally on a scroll and I have to re-invoke the view that my UICollection View is on. I can't show my exact code as this is…
0
votes
1 answer

What happens to the layout when deleting multiple UICollectionView cells?

When deleting multiple UICollectionView cells, the other cells automatically move into the deleted position. However, I want the cells to keep the order without getting mixed up. How do I make it so that the next cell from the deleted cell takes up…
0
votes
1 answer

Scale transfrom on UICollectionViewCell

I have a vertical scrolling Collection view and I want to make the centered cell bigger when scrolling happens. I'm using InfiniteLayout for infinite scrolling on my collection view. here is my custom flow layout: import Foundation import…
0
votes
1 answer

UICollectionView with fixed number of columns and dynamic cell height

A lot of good info about UICollectionView is to be found, but I was unable to answer this: How would you go about creating a vertically scrolling UICollectionView with a fixed number of columns while the cell has dynamic height. My plan was to use…
iCediCe
  • 1,672
  • 1
  • 15
  • 32
0
votes
2 answers

How to set no spacing in UICollectionViewDelegateFlowLayout?

I'm trying to do a UICollectionViewDelegateFlowLayout with 3 items to a row at a third of the screen width. For some reason it's adding spacing and not conforming to the square layout. Here are the UICollectionViewDelegateFlowLayout functions. func…
0
votes
0 answers

sizing the image in the collection view

override func viewDidLoad() { let space:CGFloat = 10.0 let dimensionwidth = (view.frame.size.width - (2 * space)) let dimensionheight = (view.frame.size.height - (2 * space)) flowLayout.minimumInteritemSpacing =…
Omar Aljoundi
  • 21
  • 1
  • 4
0
votes
2 answers

How to create various size collectionView cells without space problem

size collection view cells like below and it should be capable of adapt the same design throughout the cells in any count of JSON response. I did this from button shape but it only contains 4 static items. But I need to adapt same style of…
0
votes
1 answer

Multiple Sections Per Row using IGListKit or UICollectionView

I am trying to create a feed layout in this fashion [-------2/3-------][---1/3---] /* 2 items - 2 thirds and 1 third */ [---1/3---][-------2/3-------] /* 2 items - 1 third and 2 thirds */ [-------2/3-------][---1/3---] /* 2 items - 2 thirds and 1…
0
votes
1 answer

UICollectionView Drag and Drop cell

Hi I want to do drag drop using uicollectionview. When performing drag and drop it is moving contents i want to do it like in the photo. I want the box to carry itself. For example; when I drag the photo to 4 I should leave the red area with full…
0
votes
1 answer

Swift CollectionViewCell has different frame than its CollectionView

The Setup: I have a CollectionView which has fills the whole screen, has horizontal scrollDirection and is paging enabled. It is inside of a NavigationController with a hidden navigationBar. The CollectionViewCells have the height of the screen…
0
votes
0 answers

How to determine how many cells should be rendered in UICollectionViewFlowLayout?

I have a custom UICollectionViewFlowLayout subclass which displays all cells on top of each other (so only the topmost cell is actually visible to the user). I suppose since all views are in frame, the UICollectionView renders all cells even though…
0
votes
0 answers

UICollectionView w/ horizontal uicollectionview reuse cells problem - mixing cells on scroll

I have a UICollectionView controller that has cell which contains custom UICollectionView with flow layout that scrolls horizontally. This cell is a collection cell which has cell that holds collection items (CarItemCell). The issue is everything…
0
votes
1 answer

Different layout for different sections in collection view

I have a collection view with 3 sections, the first two sections work fine with UICollectionViewFlowLayout but the 3rd one needs a custom implementation. I understand that a collection view can only have one layout, so I've been trying to only…
0
votes
0 answers

UICollectionViewFlowLayout does not expand item spacing to fit width?

In the flow layout section of this UICollectionView guide in Apple documentation, under "Specifying the Space Between Items and Lines", we read: During layout, the flow layout object adds items to the current line until there is not enough space…
Tom Hamming
  • 10,577
  • 11
  • 71
  • 145