Я довольно долго боролся с этим заданием. Я бы хотел разработать scrollview или collectionview, который непрерывно прокручивается как по вертикали, так и по горизонтали.
Вот образ того, как я думаю, что это должно выглядеть. Прозрачные поля - это виды/ячейки, которые повторно загружаются из памяти. Как только view/cell выходит за пределы экрана, его следует повторно использовать для предстоящей новой ячейки.. так же, как работает UITableViewController
.
Я знаю, что a UICollectionView
можно сделать только для бесконечной горизонтальной прокрутки или вертикальной, а не для обеих. Однако я не знаю, как это сделать, используя UIScrollView
.
Я попробовал код прикрепленный к ответу на этот вопрос, и я могу заставить его заново создать представления (например, %20), но это не совсем то, что мне нужно. К тому же, его не является непрерывным.
Я знаю, что это возможно, потому что приложение HBO Go делает это. Я хочу точно такую же функциональность.
Мой вопрос: как я могу достичь своей цели? Есть ли руководства/руководства, которые могут показать мне, как это сделать? Я не могу найти.