ios - Size Agnostic UICollectionView//UIScrollView -


i trying figure out if there's way create uicollectionview arbitrary , potentially infinite amount of uicollectionviewcells. want able fancy things own uicollectionviewlayout.

what i'm trying create datasource that's linked-list. each element in datasource knows element comes before , after it. have no idea how big list is. don't care.

i've looked @ uitableview stuff , needs know how many elements in it. i've looked @ uicollectionview stuff , needs know how many elements in it. uicollectionviewlayout needs know how big view needs (collectionviewcontentsize). of frustrating me because don't see why detail needed.

for simplicities sake, lets assume need show 1 cell @ time. don't see why can't tell view it's 3-cells wide (always) , when scroll left or right, pop cell of long side , put on short side? @ no point need able "scroll 5" want able "next, next, next" or "prev, prev, prev"

what's best way capture behavior?

the best answer can think of far said w/ "use 3 cells" thing. have collectionview concerned how best lay out n-cells (where n 3, or 5, or 25, or somethign) , other thing concerned putting in each cell , while view cycling between same n cells, data thing pushing appropriate data them?


Comments