Proper way to setup a UISegmentedControll on UINavigationController UINavigationBar all inside UITab
- by Kaspa
The title pretty much describes it all.
The problem being the handling of the UISegmentedControll callbacks (button presses).
If the content type of all of the nested views was the same (i.e. some UITableViewControllers) then I could just switch dataSource'es and reload the tables.
However this is not the case, I have 3 very different views in there that allow further drilldown / interaction based on the NavigationControllers.
So the way I have this set up ATM is that there is a "container" class that I put all of the UINavigationControllers in. They all share the same and one UISegmentedController and I redirect the callbacks to the container view controller. This does not feel too good at all.
Additionally there is a problem when the user taps on the tab bar icon, the navigation controller pops to root which is ... the empty container view.
Here's a picture of what I want to achieve: