Im writing an app that has a navigation controller as it's main menu system but I need to be able to have a UITabBar appear inside the navigation controller when the user clicks one of the buttons on the main view. I have written everything programmatically so far so would like to keep it that way if possible.
So basically, how do I show a UITabBar inside the a navigation controller programmatically?
Many t开发者_JAVA技巧hanks :)
Depending on what you need to do you can either push a UITabBarController into the navigation controller or just add a UITabBar as a subview to a view that you need it on.
- (void) viewDidLoad {
 CGRect frame = ..create frame here..
 UITabBar *bar = [[UITabBar alloc] initWithFrame:frame];
 [self.view addSubView:bar]
}
It's that simple.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论