Search code examples
iosuitableviewplistuisegmentedcontrolselectedindex

Reading different part of .plist depending on Selected segmentIndex


I've created a plist. I want to use a UIsegmentedControl with 3 sections. Each section should load a different part of the plist into a tableView. Can I please get some advise about how to achieve this(loading a different part of the plist into a tableView)?

Please take a look at the image for more info.

Thanks

enter image description here


Solution

  • You read the three items in an array. When switching the control you simply repopulate the tableview with the correct index from your items array.