Questions tagged [uicollectionviewlayout]

The UICollectionViewLayout class is an abstract base class that is used to generate layout information for a collection view.

The UICollectionViewLayout class is an abstract base class that you subclass and use to generate layout information for a collection view. The job of a layout object is to determine the placement of cells, supplementary views, and decoration views inside the collection view’s bounds and to report that information to the collection view when asked. The collection view then applies the provided layout information to the corresponding views so that they can be presented onscreen.

More: UICollectionViewLayout Class Reference

1496 questions
-1
votes
1 answer

UICollectionViewLayout item spacing with Swift

I tried to convert this Objective-C answer to Swift, but for it always crash on this line: var previousLayoutAttributes: UICollectionViewLayoutAttributes = attributesToReturn[i - 1] This is the function: override func…
ytpm
  • 4,962
  • 6
  • 56
  • 113
-1
votes
1 answer

Increase uicollectionview cell size when it is selected in iOS

I am doing an application where I need to increase/zoom collection view cell. I am giving link to image. I need to implement similar to the image given below. Please help me someone. Thanks in…
-1
votes
3 answers

Allocating UILabel in UICollectionViewCell

I making app with collection view and different layout for portrait and landscape orientation and i am allocating UIlabel for every cell. This is how i do it. UILabel *scheduleCellLabel = [[UILabel alloc] init]; scheduleCellLabel.textAlignment =…
otter
  • 93
  • 2
  • 8
-1
votes
1 answer

UICollectionViewFlowLayout in UICollectionView - Dynamic number of cells in each section

So I'm trying to build an EPG like view with UICollectionView. This is my first experience with this framework. Something like this. It quickly came to my attention that I would need to implement a custom layout to achieve this EPG. I followed this…
-2
votes
2 answers

Self-sizing Left Aligned CollectionView Crash on layoutAttributesForElements

I want to make a left-aligned self-sizing collectionView just like this one: and here is my sample project: https://github.com/DiaobaoMiaoo/LeftAlignedSelfSizingCollectionView After running the project, rotate the device from portrait to landscape,…
Ke MA
  • 761
  • 12
  • 30
-2
votes
1 answer

Easy UICollectionView Custom Layout

I want to create a custom layout which should look like the picture here: Custom Layout I found a tutorial by Ray Wenderlich (https://www.raywenderlich.com/107439/uicollectionview-custom-layout-tutorial-pinterest) which does more or less the same…
-2
votes
3 answers

How to add lines between UICollectionView Cells?

I just want to add an effect of making the cells of UICollectionView, that looks like a chain or a connected links. Please help me what to do.
-2
votes
1 answer

UICollectionView reload ( crash )

I have a collections view and the view works fine when I load the data initially, but crashes when I try to reload it. take a look at the reload thats happening on the method - scrollViewDidEndDecelerating and the error is -[FeedCollectionViewCell…
-3
votes
1 answer

Overlapped UICollectionView Cells

For unknown reasons the cells overlapping like in the pictures below, how can I fix that problem?
-3
votes
3 answers

UICollectionView layout delegate method not called

I am initializing a UICollectionView as below , I want different line spacing for different section. let layout: UICollectionViewFlowLayout = UICollectionViewFlowLayout() layout.scrollDirection = UICollectionViewScrollDirection.Horizontal var…
-3
votes
1 answer

how to return tupplearray from dictionary here is the my Dictionary>() to [(String,Array)]

how to convert var Dictionary String, ArrayMyCushyRecords() to [(String,Array)]
technogod
  • 11
  • 2
1 2 3
99
100