title: Twitter profile page iOS Swift dissection (Multiple UITableViews in UIScrollView)
body: <p><a href="https://i.stack.imgur.com/MO69j.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/MO69j.jpg" alt="enter image description here"></a></p>
  
  <p>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 top or bottom any where, top view start scrolling until the segmented control, reach at top of the page...then scroll doesn't stop and subtable start scrolling until touching down and middle of way tableview start loading other rows dynamically ... so I don't think that they set content of scrollview statically</p>
  
  <p>second things how do they handle sub tables... are they containerView?
  if so, then the structure would be like this</p>
  
  <pre><code>ScrollView
    TopView (User Info)
    Segmented Controll
    scrollView(to swipe right or left changing tables)
       ContainerView For  TWEETS
       ContainerView For  TWEETS &amp; REPLIES
       ContainerView For  MEDIA
       ContainerView For  LIKES
  </code></pre>
  
  <p>am I right?
  so how do they handle scrolls between sub tables and Top Scroll View to implementing topview position change base on scrolling...</p>
  
  <p>it's mind blowing</p>
  
  <p>this is How I Handel Nested ScrollViews...
  i made a childDidScroll Protocol and my child tableviews implement that and in my profile page i can receive all child didscroll event then in 
  childDidScroll method :</p>
  
  <pre><code>   //if child scrollview going up
  if(scrollView.panGestureRecognizer.translation(in: scrollView.superview).y &gt; 0)
          {
              //check top scrollview if it is at bottom or top
              //then disable the current scrollview
              if mainScrollView.isAtBottom &amp;&amp; scrollView.isAtTop{
                  scrollView.isScrollEnabled = false
              }else{
                  //else enable scrolling for my childs
                  featuresVC.tableView!.isScrollEnabled = true
                  categoriesVC.tableView!.isScrollEnabled = true
                  shopsVC.tableView!.isScrollEnabled = true
              }
              print("up")
          }
          else
          {
              if mainScrollView.isAtTop {
                  scrollView.isScrollEnabled = false
                  mainScrollView.scrollToBottom()
  
              }else{
                  featuresVC.tableView!.isScrollEnabled = true
                  categoriesVC.tableView!.isScrollEnabled = true
                  shopsVC.tableView!.isScrollEnabled = true
  
              }
              print("down")
          }
  </code></pre>
  
  <p>but this solution has a some cons... and one of the is that first when child scrollview is at top or button, there should be two try to call my parent scrollview handle the scrolling, in first try i disable the child scrollview, and in second try parent scrollview handle the scrolling</p>
  
  <p>** how can i say when you , my child, scrolling up, check if your parent is at top, then let him handle the scroll and when he touching the bottom, you can handle remain up scrolling, or tell the parent scrollview , if you are at top (user info is visible) if you or your child getting up scrolling, first you handle the scroll and when you rich at bottom(user info is not visible), let the remain scrolling on you child**</p>