I am using tableView in which I placed UISegmentedControl in Header of section as I have only one section in TableView. I reload the tableView when Segment change.
Now when I reload TableView then section header also reloaded and due to reloading of Section Header the UISegmentedControl is also recreated so loose its previous state (selected segment of UISegmentedControl).
So I want to ask is there any way to reload the TableView without reloading the Section Header?
Use a variable to store state of UISegmentedControl. Assign 0 in viewDidLoad().
When user change state of then save the state in variable.
On reloading table use variable to get old state