title: UISegment Control in UITableView
body: <p><img src="https://i.stack.imgur.com/pyKsU.png" alt="enter image description here">I have added a segment control to my table view and what my problem/question is I need to display text in tableview cells based on segment selected.</p>
  
  <p>I have followed some tutorials, in that they gave me text in labels based on segment selected. I used <code>segmentControl.selectedIndexPath</code> also. So can anyone tell me how can we set that array of objects to my tableview cells based on segment selected? </p>
  
  <p>Correct me if any mistakes in my english.</p>
  
  <p>Please help me.
  Thanks a lot for help.</p>