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
0
votes
1 answer

UICollectionView: 1 row horizontal scrolling (right to left) with custom animation for new cell coming from right

I have a 1 row collections view with images I scroll the images from right to left I would like to make an animation for each cell coming from the right (ala Google+) This animation could be based on Alpha or frame location How to implement that ?
fvisticot
  • 7,936
  • 14
  • 49
  • 79
0
votes
1 answer

UICollectionView Custom Layout - Cells are not properly arranged

In my iPhone app,I want to use custom lay out in UICollectionview.There will different heights for Collection view cells.I want to set a lay out like that. I tried many things and at last,made that height adjustment.(I am getting height for each…
user2115266
  • 137
  • 1
  • 12
0
votes
1 answer

How to add a background to UICollectionView like iBooks?

iBooks app on ios,the bookshelf background will follow the books when scrolling. Where can I add the background like iBooks?
yellow
  • 702
  • 1
  • 10
  • 24
0
votes
1 answer

UICollectionViewFlowLayout sections as columns rather than rows

I'm trying to create a UICollectionView of two columns (of potentially different lengths) with the property that when a cell is deleted the cells below (rather than the cells to the right) move up to take its place. I have considered customising the…
Hugh
  • 61
  • 2
0
votes
1 answer

UIImageView resizes automatically on UICollectionViewCell, for no apparent reason

I'm trying to show a few images using UICollectionView, I already have the animation i wanted (to zoom in the "active" cell) and it works perfect when i just use the cell. When i add an image to the cell, it works as intended on first load of the…
0
votes
1 answer

Interpolation issue on custom UICollectionViewFlowLayout

I'm having an issue with a custom UICollectionViewFlowLayout Like this video shows Issue Video, when my cell bounces back to the center (0:12 - 0:16) my transformation interpolation fails, and it jumps to the center position in 1 frame. I isolated…
Goles
  • 11,599
  • 22
  • 79
  • 140
0
votes
0 answers

UICollectionView custom flow layout

I am using UICollectionView custom flow layout in my project. When we set UICollectionViewFlowLayout to our custom collection view layout, the iOS considers the scroll direction to be vertical by default and when we increase the cell size beyond a…
iSaalis
  • 622
  • 1
  • 8
  • 14
0
votes
1 answer

Rows and columns of UICollectionViewFlowLayout

Given a UICollectionView with flow layout, what's the simplest way to calculate the number of columns (vertical direction) or rows (horizontal direction) of the collection view?
hpique
  • 119,096
  • 131
  • 338
  • 476
0
votes
1 answer

Giving an absolute position to a UICollectionViewCell

is it possible to control the layout of a UICollectionViewCell as to give it an absolute x or y position? I want to use a UICollectionView, in each row of a table in order to create a simple 5 day calendar. At the moment I am just positioning a set…
0
votes
1 answer

UICollectionView change orientation incorrect number of cells

I have a UICollectionView that displays 2 columns when in portrait mode, then when the iPhone is rotated to landscape, it displays 4. However, when the device is rotated back to portrait mode, it attempts to display 3 columns. So it display 2…
Jacob Joz
  • 732
  • 1
  • 11
  • 29
0
votes
2 answers

Custom UICollectionView Layout

The UICollectionView layout I need to implement contains three sections, one below the other vertically, and each section is scrollable horizontally. SECTION 1: 1 2 3 4 5 .............. SECTION 2: 1 2 3 4 5 .............. SECTION 3: 1 2 3 4 5…
chandu
  • 476
  • 5
  • 12
0
votes
1 answer

IOS: Animate UICollectionViewCells to slide when changing orientation

I'm looking to override my UICollectionViewFlowLayout to cause the cells to slide when changing positions due to an orientation change. What I have currently is 3 cells per row in portrait and 4 cells per row in landscape but the only animation I…
0
votes
1 answer

Setup UICollectionViewLayout to match a column split UITableView like result

I'm new to UICollectionView in iOS 6 and so far it seems like it's pretty much like a UITableView however I'm trying to figure out a way to make the pagingEnabled feel of a UISCrollview work with a set of cells I'm displaying as if they were a…
perrohunter
  • 3,454
  • 8
  • 39
  • 55
0
votes
1 answer

Strange UICollectionViewFlowLayout overriding behaviour

I'm trying to override UICollectionViewFlowLayout, but I realized something strange. Here you can see a little code snippet: #import @interface SimpleFlowLayout : UICollectionViewFlowLayout @end @implementation SimpleFlowLayout -…
gabor.orosz
  • 433
  • 8
  • 20
-1
votes
2 answers

UICollectionView Custom Cell Size in Swift

I want to get the following Layout by using the UICollectionView, what's the best approach to achieve this. I have tried this approach but not getting desired outcome func collectionView(_ collectionView: UICollectionView, layout…