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

前端 未结 2 1412
灰色年华
灰色年华 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条回答
  • 2021-01-02 20:36

    This might help you with implementing UICollectionViews in your UITableViewCell: http://ashfurrow.com/blog/putting-a-uicollectionview-in-a-uitableviewcell

    To make the first cell "float" in the TableView you could make sure that cell never goes out of screen in scrollViewDidScroll

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题