UItabbar item not showing storyboard reference

前端 未结 4 751
死守一世寂寞
死守一世寂寞 2020-12-29 02:54

I\'m trying to use the new storyboard references in a tabbar. When I use the storyboard reference, the UITabBarItem (with customized image & text set), isn\'t showing an

相关标签:
4条回答
  • 2020-12-29 02:55

    Refer following links

    1. How to change the tab bar image color for selected and unselected

    2. Tab bar item not showing

    0 讨论(0)
  • 2020-12-29 02:56

    You need to add the tab bar item in the destination storyboard view controller.

    0 讨论(0)
  • 2020-12-29 03:00

    you can get storyboard reference like this

    UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle: nil];

    0 讨论(0)
  • 2020-12-29 03:07

    This answer is pretty late, but I had an similar problem. This may be helpful for others who find this post later.

    When using a UISplitViewController there is an issue for me adding the item in storyboard which can be solved with a workaround.

    Scenario:

    UITabBarController -> StoryboardReference -> UISplitViewController

    Problem:

    You can't add an UITabBarItem to the UISplitViewController

    Solution / Workaround:

    Add an UITabBarController within the UISplitViewControllers storyboard and assign the UISplitViewController as one of the tabs.An UITabBarItem will be added to the UISplitViewController. You can delete the unnecessary UITabBarController. The UITabBarItem will be kept.

    0 讨论(0)
提交回复
热议问题