Twitter profile page iOS Swift dissection (Multiple UITableViews in UIScrollView)

后端 未结 3 1556
[愿得一人]
[愿得一人] 2021-01-12 06:08

hi... really how do they implement this? there are several tutorial for Twitter profile page. but they don\'t handle all possibilities... first... when you scroll

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-12 06:49

    I believe you are mostly right, except for the topmost scroll view.

    In a recent app, I implemented something similar following this tutorial:

    Basically, the trick is to have a class be the scrolling delegate of the bottom UITableViews, listen to the scrollViewDidScroll modifications, and modify the top inset of the UITableView and the TopView.

    The structure I would use is like this:

    Topview
    ScrollView (horizontal scroll)
      Segmented Control
    ScrollView (horizontal, paging scroll)
      UITableView
      UITableView
      UITableView
      UITableView
    

    You are totally right in it being mind blowing. Looks so simple.

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题