title: Table rows in segmented control wont scroll up when segment changes
body: <p>I have two segments <code>ONC</code> and  <code>OFC</code>, after data is displayed in <code>ONC segment</code> and I scroll it to <code>row15</code>, when I change the segment to <code>OFC</code>, it shows <code>row15</code> but I want it to show <code>row1</code></p>
  
  <pre><code>public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int
  {
      var typeOfEvent = 0
      switch (eventSegCtrl.selectedSegmentIndex)
      {
      case 0:
          typeOfEvent = oncEvents.count
          break
      case 1:
          typeOfEvent = ofcEvents.count
          break
      default:break
      }
  
      return typeOfEvent
  }
  </code></pre>
  
  <p>How do I solve this?</p>