# UICollectionView with full page cells VS UIScrollView with child view controllers

**URL:** <https://forums.kodeco.com/t/uicollectionview-with-full-page-cells-vs-uiscrollview-with-child-view-controllers/45143>\
**Category:** iOS\
**Created:** [July 26, 2018, 7:43am UTC](https://forums.kodeco.com/t/uicollectionview-with-full-page-cells-vs-uiscrollview-with-child-view-controllers/45143 "2018-07-26T07:43:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![akashpopat](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@akashpopat](https://forums.kodeco.com/u/akashpopat)\
**Post date:** [July 26, 2018, 7:43am UTC](https://forums.kodeco.com/t/uicollectionview-with-full-page-cells-vs-uiscrollview-with-child-view-controllers/45143/1 "2018-07-26T07:43:26Z")

</div>

I’m trying to create a ViewController which would have swipe-able (android like tabs) pages. These pages themselves will have scrollviews(vertical) inside them and multiple views which would be added dynamically depending on type of response (different network calls for each page). I can’t use a PageViewController as I want the pages to take up only half the screen.

Issues with CollectionView -

- If the cells would get reused (or removed from memory), how would I maintain the state of the cell’s UI and store that data (especially difficult for views as each page might have different type of view in them)

Issues with ScrollView -

- I’m worried if there would be memory issues if all page view controllers would be in memory with each view in it

PS - data in each page would be 4-10 stackviews each containing 2-10 images/labels OR just one collectionview

PSS - Total number of tabs wouldn’t exceed 10, minimum would be 1

---

<div class="post-metadata">

**Author:** ![vimipatel](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/vimipatel/32/83106_2.png) [@vimipatel](https://forums.kodeco.com/u/vimipatel)\
**Post date:** [October 10, 2018, 12:47pm UTC](https://forums.kodeco.com/t/uicollectionview-with-full-page-cells-vs-uiscrollview-with-child-view-controllers/45143/2 "2018-10-10T12:47:26Z")

</div>

1. As you described above that your pages won’t exceeds to 10, then no memory issue will raised with `UIScrollView`. Whenever you are creating or setting up date in scrollview fir remove all child views / subviews.

2. If your data not similar page wise and each page contain different UI, then you can use `UIScrollView` or `UICollectionView`. I suggest to use scrollview with different different cells. You have to create cells as per your data in pages.

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [January 8, 2019, 11:43pm UTC](https://forums.kodeco.com/t/uicollectionview-with-full-page-cells-vs-uiscrollview-with-child-view-controllers/45143/3 "2019-01-08T23:43:30Z")

</div>

Closed on January 8, 2019, 11:43pm UTC

This topic was automatically closed after 166 days. New replies are no longer allowed.
