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

UICollectionViewFlowLayout subclass not working

Here is my UICollectionViewFlowLayout subclass: @implementation MyCollectionViewFlowLayout - (id)init { self = [super init]; if (self) { [self setup]; } return self; } - (void)setup { self.itemSize = CGSizeMake(320,…
soleil
  • 12,133
  • 33
  • 112
  • 183
0
votes
2 answers

UICollectionView double items

I have double items in my collectionView. How can I fix it? I have UITableViewCell with UICollectionViewCell inside it. I set elements size and direction based on its count. My cell - (id)initWithStyle:(UITableViewCellStyle)style…
0
votes
2 answers

Collectionview CustomLayout

I want a collectionview cell should be the dynamic height. I am getting data from server and loading in to tableview inside collectionview cell. That cell height should be change according to the table cell height, I am getting till here. But the…
0
votes
1 answer

using TLLayoutTransitioning with ViewController.useLayoutToLayoutNavigationTransitions

I'm trying to use TLTransitionLayout with ViewController.useLayoutToLayoutNavigationTransitions and then push the transition [self.navigationController pushViewController:[self nextViewControllerAtPoint:pinchedStackCenter] animated:YES]; I have…
0
votes
2 answers

Assertion failure in UICollectionView

I'm getting this error: *** Assertion failure in -[UICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndexPath:viewCategory:], /SourceCache/UIKit_Sim/UIKit-2935.137/UICollectionView.m:3241 Two methods: -…
0
votes
0 answers

How to change cell's size dynamically in a custom UICollectionView without implementing collectionView:layout:sizeForItemAtIndexPath:

I have created my own layout by subclassing the UICollectionViewLayout class, and not the UICollectionViewFlowLayout one. Hence it seems that I cannot implement the method collectionView:layout:sizeForItemAtIndexPath:. Unfortunately, I may want to…
0
votes
0 answers

Pagination for UICollection View horizontal scroll

We have implemented a horizontal scroller with UICollectionView by customizing the collection flow layout dimensions. We wanted to show left pagination indicator and right pagination indicator to tell that there are more cells to the left and/or…
Sabbu
  • 411
  • 4
  • 8
0
votes
1 answer

UICollectionView does not reveal all cells in Simulator

I am not very experienced with UICollectionView and Auto-Layout. I have a very basic UICollectionView inside a root view. The root view seems to have a Navigation Item. I created a custom cell which is really a square in proper size to allow 2 such…
0
votes
1 answer

Cover Flow layout based on UICollectionViewFlowLayout

I have created a cover flow layout by subclassing UICollectionViewFlowLayout. There is an animation that pushes one item to center of the screen based on the…
Nuno Santos
  • 1,476
  • 3
  • 17
  • 34
0
votes
1 answer

Animating UICollectionViewCell size on selection

So I have a subclassed uicollectionflowlayout. I am trying to animate a cell size on selection as well as deselection. On did select cell I have this: [CATransaction begin]; [CATransaction setCompletionBlock:^{ BubblesCollectionViewFlowLayout…
0
votes
1 answer

Disappearing UICollectionViewCells on landscape orientation

I have a problem managing my UICollectionsView with flowlayout and orientation. Basically, the problems happens when I switch to landscape, some of the UICollectionViewCells are missing. They reappear once I start scrolling. It should be able to…
0
votes
1 answer

When reloading sections, footer is not displayed in UIViewCollectionView

Basically I have a button on the footer of a section that shows more cells in that particular section. However, I have a problem when I perform : [self.friendsCollectionView reloadSections:sectionSet]; The footer seems to disappear after the…
Frank
  • 3,073
  • 5
  • 40
  • 67
0
votes
1 answer

UICollectionView using TLLayoutTransitioning resize with single row

I'm using TLLayoutTransitioning (https://github.com/wtmoose/TLLayoutTransitioning) to animate a resize of my UICollectionView cells. The example resize in the demo code is what I want (full size to small size). However I need to retain a single…
Shocks
  • 808
  • 1
  • 9
  • 18
0
votes
1 answer

I need help animating UICollectionView cell size when collection view size changes

I have a UICollectionView that takes up the entire screen, and inside it are cells that are the same exact size as the collection view. When the user hits a button, the collection view animates to take up only half the screen (and another view is…
0
votes
1 answer

Do I need to write a custom UICollectionViewLayout

I've got an idea for a collection view that keep the items centred when there is only a few item, then falls back to a traditional vertical flow. Here's how I picture it expanding as I need more items. 1. Is this acumblisable with a generic…
Benjamin
  • 663
  • 8
  • 23