How to Make the scroll of a TableView inside ScrollView behave naturally

后端 未结 13 2071
无人及你
无人及你 2020-12-07 08:22

I need to do this app that has a weird configuration.

As shown in the next image, the main view is a UIScrollView. Then inside it should have a UIPageView, and each

13条回答
  •  误落风尘
    2020-12-07 08:55

    Maybe brute-force, but working perfectly: by the way, I use auto layout.

    for the tableView (or collectionView or whatever), set an arbitrary height in storyboard, and make an outlet to class. Wherever appropriate, (viewDidLoad() or...) set the tableView's height big enough so that tableView doesn't need to scroll. (need to know the number of rows in advance) Then only the outer scrollView will scroll nicely.

提交回复
热议问题