How to set the Navigation Bar Color of the Tab Bar Configure Menu

后端 未结 8 520
离开以前
离开以前 2021-02-03 21:39

removed dead ImageShack link

As you can see the view I need to change is the provided view to customize the tabbar order. I want to change the color of the navi

8条回答
  •  难免孤独
    2021-02-03 21:51

    I was able to change the color of the Configure NavBar like this:

    1. Create a new class that inherits from UITabBarController.
    2. Implement this method:

      -(void)beginCustomizingTabBar:(id)sender
      {
          [super beginCustomizingTabBar:sender];
      
          // Get the new view inserted by the method called above
          id modalViewCtrl = [[[self view] subviews] objectAtIndex:1];
      
          if([modalViewCtrl isKindOfClass:NSClassFromString(@"UITabBarCustomizeView")] == YES)
          {
              UINavigationBar* navBar = [[modalViewCtrl subviews] objectAtIndex:0];
      
              [navBar setBarStyle:UIBarStyleBlackTranslucent];
              [navBar setTranslucent:YES];
          }
      }
      

提交回复
热议问题