0

I'm building a tabBarController and adding some subviews in it, here is what I get:

On iOS7 the tabBarItem appears misaligned enter image description here Until I do click on one of them which realigned each tab enter image description here This do not appears on iOS6, have you experienced a similar behaviour already and what is the solution / workaround you found to fix it ?

4

1 回答 1

0

I found a possible answer, if the title of the UILoginNavigationController is the same as the first view controller we add inside, then the icons and text gets misaligned. I suspect apple to use the title in order to determine if there is a need or not to refresh tabs.

Trying to keep it simple: each tab hold a UINavigationController, if the navigation controller do have the same title as a root view we do push inside, the icons are misaligned iOS7

// NavigationController related code

UILoginNavigationController*loginNavigationController=[[UILoginNavigationController alloc] init];
loginNavigationController.title=@"something";

// LoginViewController related code @implementation UILoginViewController

    - (void)viewDidLoad
    {
        [super viewDidLoad];
        self.title=@"something"; // <- if the same as above = misaligned
    }
于 2013-11-06T18:13:10.667 回答