ios - Custom collection view layout with Indexpath of length 3 -


I am trying to create custom layouts and index paths of each layout attributes to some additional information such as sections, rows, columns Need to include To include in it, I assign the length of the NSIndexpath category which is <3> Code NSIndexpath . Bellow class code snippet

+ (NSIndexPath *) IndexPathForColumn: Line for the column: (NSUInteger) Analysis for the line: (NSUInteger) section {

  NSUInteger index [] = {section, row, column}; NSIndexPath * returnIndexPath = [[NSIndexPath alloc] initWithIndexes: index length: 3]; Return return index; }  

I thought, I would get the same indicator path path collection archive data data method, but " view the collection of cellophore ITMT and xpath: length 2.

I did not understand why is it that someone can tell me the reason behind this and what option is available to achieve the expected behavior?

The answer is very simple and still unsatisfactory for you. This can not be done.

The indexpath is created by the collection and not by itself, since the collectionView does not have any attribute columns, so you can not use it.

What you can do is calculate the column value based on your layout. You know the size of your elements and you get the section and row, so you can calculate the column.

Expected That helps

Cheers, Sebastian


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -