iOS 11 iPhone X simulator UITabBar icons and titles being rendered on top covering eachother

前端 未结 30 2497
误落风尘
误落风尘 2020-11-29 17:05

Anyone having issue with the iPhone X simulator around the UITabBar component?

Mine seem to be rendering the icons and title on top of each other, I\'m not sure if I

30条回答
  •  盖世英雄少女心
    2020-11-29 17:46

    I was having the same issue which was solved by setting the items of the tabBar after the tab bar was laid out.

    In my case the issue happened when:

    1. There is a custom view controller
    2. A UITabBar is created in the initializer of the view controller
    3. The tab bar items are set before view did load
    4. In view did load the tab bar is added to the main view of the view controller
    5. Then, the items are rendered as you mention.

提交回复
热议问题