Proper way to setup a UISegmentedControll on UINavigationController UINavigationBar all inside UITab
        Posted  
        
            by Kaspa
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Kaspa
        
        
        
        Published on 2010-01-21T08:40:10Z
        Indexed on 
            2010/05/24
            1:40 UTC
        
        
        Read the original article
        Hit count: 408
        
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:

© Stack Overflow or respective owner