0
votes

I am having an issue with some odd rendering behaviour on iOS as the screenshot below will illustrate.

iOS7 odd navigation/tab bar rendering behaviour

The layout architecture for my app is as follows:

  • I have a main view controller that contains a tab bar controller and a standard UIViewController as child view controllers.

  • The tab bar controller is the main thing the user sees and when there is a pan gesture across the navigation bar, it reveals the second view controller as a menu view controller. Pan to reveal.

  • I have a tab bar controller which contains a series of tabs, each one containing a navigation controller.

  • Each of these navigation controllers contains a view controller.

The problem happens when I have pushed another view controller onto one of the navigation controllers - where the back button appears. At all other times everything is ok.

Has anyone else encountered this issue before? I am using the appearance proxy for setting the colours on the tab bar and navigation controllers.

1

1 Answers

0
votes

It turns out that I had to set the translucency of the NavigationBar and the Tab bar to NO and this seems to have fixed it.

In my Tab Bar controller I added the following line to viewDidLoad

- (void)viewDidLoad {
    [super viewDidLoad];

    [self.tabBar setBarTintColor:[UIColor whiteColor]];
    [self.tabBar setTintColor:[UIColor redColor]];
    [self.tabBar setTranslucent:NO];
}

In my NavigationController I added the following to viewDidLoad

- (void)viewDidLoad {
    [super viewDidLoad];
    [[UINavigationBar appearance] setBarTintColor:[UIColor redColor]];
    [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
    [self.navigationBar setTranslucent:NO];
}

Hope this helps others who have had the same problem.