How to create a layout like Featured page in App Store?

前端 未结 2 1429
灰色年华
灰色年华 2021-01-02 20:12

I\'m new in iOS development. Based on my assumption, Feature page in App Store was created using a combination of UITableView and UICollectionView. But how to do that in the

2条回答
  •  Happy的楠姐
    2021-01-02 20:37

    OK, I think I finally found my own answer.

    1. First, I need a UIScrollView to be root of the view. Then I set the contentSize to be a specific value.
    2. The top section can be a UIPageController or a horizontal UIScrollView.
    3. The middle section is a UITableView with scrollEnabled to NO and cells are static. The static cells (could also be dynamic cells) will contains UICollectionView. Since the scroll is disable, it will use the scroll from the parent UIScrollView. So that's why I can get the same bouncy effect in the middle section.
    4. The bottom section is just another cell of a UITableView.

    Thanks.

提交回复
热议问题