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 know when UICollectionView has finished layout?

How is it possible to know when UICollectionView has finished laying out items?
0
votes
1 answer

Custom collection view layout

How can I achieve this layout: The content flows like the UICollectionViewFlowLayout with UICollectionViewScrollDirectionHorizontal, but there can be more than one section depending on collection view size. Also, the sections don't occupy full…
Thomas Joulin
  • 6,590
  • 9
  • 53
  • 88
0
votes
1 answer

Creating a custom collection view layout

I am attempting to create a collection view that looks like the schematic below. The centre item will always have 'focus' and be larger, its quite a bit like the cover flow concept: http://s13.postimg.org/n6vzil213/layout_schematic.png I can achieve…
DBoyer
  • 3,062
  • 4
  • 22
  • 32
0
votes
1 answer

uicollectionview rotation cell visibility & position and order

I have a UICollectionView which should have 3 columns and 5 rows. They are static and won't be changed. the UICollectionView should not scroll, so the cells are visible the whole time. It looks good in portrait mode, but the view is messed up in…
Hashmat Khalil
  • 1,826
  • 1
  • 25
  • 49
0
votes
2 answers

It's possible to customize UICollectionView for displaying few sections like one?

I have three different kind of objects that I want to display in collection view. But if in section 0 is only 1 element, next section starts from new column. Can I tell to the layout that it should show items in different sections one after the…
AlKozin
  • 904
  • 8
  • 25
0
votes
2 answers

Use CollectionViewLayout of a CollectionView created in XIB?

I've got a XIB named 'ImageViewController.xib" which contains a collection view. I've set up my desired collection view layout on this collection view inside the xib. When trying to run my app I get the error message: 'UICollectionView must be…
ritch
  • 1,760
  • 14
  • 37
  • 65
0
votes
1 answer

Unknown class in storyboard when assigning Swift class in Xcode 6 beta 4

I've started new project in Xcode6 beta 4 and in Swift language. I'm using UICollectionView which is added in storyboard and all is connected and works nice with default flow layout. Also I've created Swift subclass of UICollectionViewLayout class…
Tomasz Szulc
  • 4,217
  • 4
  • 43
  • 79
0
votes
1 answer

Can not get UICollectionView to show up

I have added a UICollectionView to a UIViewController, but it does not show up, why? I can see only the black background. Labels textcolor is white. UPDATE I had to implement the following UICollectionViewDataSource methods. The lesson that…
János
  • 32,867
  • 38
  • 193
  • 353
0
votes
1 answer

UiCollectionView scrollable both horizontally and vertically

I want to create a CollectionView that is scrollable both horizontally and vertically, but I realized that by default is scrollable only in one direction, how can I do?
0
votes
1 answer

UICollectionView spacing margins not taking the space from the methods

I am trying to kill the margin left that the UICollectionViewCell have as shown in the picture. I tried using all the methods that I could think of to take that margin away but nothing seems to work. All the methods are being called as I tested it…
Jonathan Thurft
  • 4,087
  • 7
  • 47
  • 78
0
votes
1 answer

UICollectionView - a couple of questions

I'm working on an app that is making use of a collecitonview. It's pretty simple as far as the colletionview goes...just displays an array of uiimages in a single-line, horizontal direction view. Here are my questions... Do I need to have a custom…
SonnyB
  • 269
  • 3
  • 12
0
votes
1 answer

Prevent UICollectionViewFlowLayout from calculating its own sectionInsets with variable size items

When I specify sectionInsets, for example: flowLayout.sectionInset = UIEdgeInsetsMake(80, 50, 10, 20); And all items in my UICollectionView are the same size, the sectionInsets are applied as expected. When all items in the UICollectionView are not…
0
votes
2 answers

How do you add a UICollectionViewController to a UIScrollview within a UIViewController?

I am trying to use this as a starting point to learn about collection view: Creating a UICollectionView programmatically I have a viewDidLoad which has a UIScrollView created like so: UIScrollView *scrollView = [[UIScrollView alloc]…
cdub
  • 24,555
  • 57
  • 174
  • 303
0
votes
1 answer

UICollectionView - items not ordered as they should

I'm using UICollectionview to show 4 cells on each side (paginated). The Collectionview can be scrolled from left to right, snapping itself to always show the next or previous 4 cells. The problem is, the cells are ordered like this: 13 24 and I…
gasparuff
  • 2,295
  • 29
  • 48
0
votes
2 answers

UICollectionView with TLSpringflowLayout not Scrolling smoothly when you add more than 20 rows

I m creating a Bubble table like message app in iOS. It require the Bouncing effect of cells while scrolling. Its working fine without TLSpringFlowLayut But, with this layout the scroll is very slow and chopy. Also in device its taking High Memory…