iOS 5: Can you override UIAppearance customisations in specific classes?

后端 未结 3 684
自闭症患者
自闭症患者 2021-02-13 06:05

I\'m building an app with many view controllers: I have a UITabBarController which holds 4 UINavigationController. I want all the nav bars to be my cus

3条回答
  •  忘掉有多难
    2021-02-13 06:31

    For that you would do:

    id specialNavBarAppearance = [UINavigationBar appearanceWhenContainedIn:[SpecialViewController class], nil];
    
    [specialNavBarAppearance setBarStyle:UIBarStyleBlack];
    [specialNavBarAppearance setTranslucent:YES];
    

提交回复
热议问题