Reputation: 3283
I am using a UITabBarController with 3 tabs. The text of only the first tab is being duplicated. By using the view inspector, and inspecting the duplicated item, we can see that it is exactly the same object reference between the two tab bar items, which doesn't make sense. How can the same view appear simultaneously with 2 different frames. I'm not doing anything special to wire up these tabs, and only the first tab is duplicated. They are wired through interface builder. I also tried stripping it down to the bare minimum, where I'm not executing any code to customize the tab bar - the problem still persists. It occurs on iOS10.
Upvotes: 1
Views: 388
Reputation: 3283
I found the answer. I was setting the title in the View controller of the first tab's view controller like this:
[self.parentViewController setTitle:@"Song Lists"];
Removing that got rid of the Left-aligned version of the tab text, and leaves the centre-aligned version which is defined in the storyboard tab title.
Upvotes: 2