0

I have a Collectionview(iPad) with

  • flow layout
  • Scroll direction: horizonlal
  • 3 items at Y and 7 items at X

Possible Device-Orientation is only Landscape.

The normal sorting is like this(one page):

01 04 07 10 13 16 19
02 05 08 11 14 17 20
03 06 09 12 15 18 21

But i need a sorting like this:
act. page............................next page

01 02 03 04 05 06 07 | 22 23 24 25 26 27 28
08 09 10 11 12 13 14 | 29 30 31 32 33 34 35
15 16 17 18 19 20 21 | 36 37 38 39 40

Is it possible to change the item-position with custom-layout? I tried to sort the data source pagewise like 01, 08, 15 ... but this dont help if jump to an entry middle of such a page and at all i cannot use sections.

Udo
  • 43
  • 6
  • You can do this with a custom layout. But... how long is each row? With a horizontal scroll there is no need to wrap any lines. Just have one long line. Unless you set some arbitrary length to the row then it will never wrap – Fogmeister Nov 27 '19 at 09:11
  • @Fogmeister. Wrap lines allways at the right of screen, means nr 07. Maybe with paging. – Udo Nov 27 '19 at 15:37
  • Then surely you want vertical scrolling? What happens if there are 100 items? Where would the 100th item be? How would you see it? – Fogmeister Nov 27 '19 at 16:05
  • @Fogmeister. I only want horizonal scroll. My data are alphanum. sorted(items with picture and text). The reason why i dont like the actual sorting is that we used to read from left to right not from top to buttom. I updated my question, there is also a following page. 100 items, then i want see the first 21 like above(bold numbers), scroll to the next page i see items 22-42, 42-63 etc. I didnt show item 41 and 42, this would be empty if there are only 40 datasets. – Udo Nov 27 '19 at 17:54
  • Your requirements are contradictory. I cannot help here. – Fogmeister Nov 27 '19 at 18:45
  • I dont know what is contradictory at this, but thanks for trying. Meanwhile i found this https://stackoverflow.com/questions/16678474/uicollectionview-horizontal-paging-can-i-use-flow-layout?rq=1. Unfortunatly the solutions dont work. – Udo Nov 28 '19 at 09:20

0 Answers0