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

How to make a UICollectionView fill vertical space before moving to next row

I want to use a UICollectionView to create a layout that looks like this. However, the default flow layout lays things out like this instead. How should I go about trying to achieve my desired effect? Can UICollectionViewFlowLayout being…
Michael Luton
  • 1,058
  • 11
  • 29
0
votes
1 answer

Guidance - Custom UICollectionView animation

I am looking for guidance with how to approach the following animation scenario. I have UICollectionView with a custom circular UICollectionViewLayout subclassed layout. There are (circular) images around the perimeter of the circle and a 50% larger…
psparago
  • 1,113
  • 11
  • 21
0
votes
1 answer

CHTCollectionViewWaterfallLayout deleting cell not working properly

I am using CHTCollectionViewWaterfallLayout for the layout for my UICollectionView and I am trying to make it possible to remove a cell. All the data provided to my cells are loaded from a local database. To delete the cell I am removing it from the…
Black Magic
  • 2,706
  • 5
  • 35
  • 58
0
votes
2 answers

Custome cell in UICollectionView contoller not getting called

I'm subclassing my UICollectionViewController cell like this : -(CategoryScreenCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { NSLog(@"cellForItemAtIndexPath load"); …
Ahad Porkar
  • 1,666
  • 2
  • 33
  • 68
0
votes
4 answers

Setting size of UICollectionViewCell in a way that there is no interim spacing in between

I'm using an UICollectionView on which I want to place seven cells side by side. The whole screen should be used for this. Currently, I'm using the width of the collection view and divide it by seven. Now I get an item width of 45.71429 on an iPhone…
0
votes
0 answers

IOS:How to Subclass and Customize UICollectionViewLayout

I'm trying to do what is mentioned here:How to expand UICollectionView contentSize when paging enable? All I want to do is override this method here so I could increase the collectionview content size. I'm assuming the rest should work fine because…
0
votes
0 answers

UICollectionView cells with relative size

I'm trying to build a UICollectionView Layout, that will adjust the size of the UICollectionView cells depending how many are they, so they could fit in a specific UICollectionView frame. For instance, if there is just one cell it's size will be…
0
votes
1 answer

What should I subclass UICollectionViewLayout or UICollectionViewFlowLayout

I have the sketch of the layout as follows :- Above Image, has fixed layout structure as follows -> First Row has item no.1 and takes all the width of the collection view. ->Second row has item no. 2 and 3 and shares the width equally. ->third row…
0
votes
2 answers

UICollectionViewFlowLayout position

I have a problem When I click the tabcontoller uıcollectionviewflowlayout position is changing :( The following code does not work - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; UICollectionViewFlowLayout…
0
votes
1 answer

How can I keep the same collection view cells on the screen when zooming a UICollectionView?

I have a UICollectionView that uses a UICollectionViewLayout subclass for its layout. The layout is a simple grid. When I zoom the collection view in or out, the positions of the cells on the screen change. In some cases, when zooming in, cells…
Carl Smith
  • 1,236
  • 15
  • 18
0
votes
1 answer

Adding Animating button to each image in UICollectionviewcell just like iPhone Photo App

I'm in the process of creating iPhone photo App like application.In iPhone Photo App on selecting a image -> Tapping share button -> Rotate the device to landscape, we get a selection button at the bottom of all the image items. The selection button…
0
votes
0 answers

UICollectionView not animating bound change

I have a UICollectionView in UISplitViewController with a custom UICollectionViewLayout which implements: prepareLayout to store the attributes with right frames (based on orientation); collectionViewContentSize to return the right collection view…
entropid
  • 6,130
  • 5
  • 32
  • 45
0
votes
2 answers

How to create a view controller with buttons layed out in a grid?

I have an app, where the main screen should contain a logo and six button layed out in a grid of 2x3 in portrait and 3x2 in landscape mode. Using auto layout, I can place the logo (uiumage) correctly and the uicollectionview correctly, and they lay…
mrd
  • 4,561
  • 10
  • 54
  • 92
0
votes
1 answer

I used UICollectionViewFlowLayout category and my app crash sometimes with PhotosUI

I don't use PhotosUI framework in any place of my app .Don't know why I got crash report from PhotosUI . Here is crash report from Crashlytics . 0 CoreFoundation __exceptionPreprocess + 130 1 libobjc.A.dylib objc_exception_throw +…
Kong Hantrakool
  • 1,865
  • 3
  • 20
  • 35
0
votes
1 answer

UICollectionView can't create perfect 3x3 grid for iPhone 5. Is it possible?

I am having trouble creating a perfect 3x3 grid using a UICollectionView on the iPhone 5. Basically I want there to be 0 spacing between each cell. When I do it on the iPhone 6, it works because the width can be divided perfectly into 3 (375px/3 =…
evenodd
  • 2,026
  • 4
  • 26
  • 38