iOS 7 TabBar Translucent issue

前端 未结 6 2070
慢半拍i
慢半拍i 2020-12-07 23:38

I have an issue, when I set the translucent box off on a TabBar, there is something blocking some of my view.

It looks like it\'s a sort of extra tab bar or I don\'t

6条回答
  •  青春惊慌失措
    2020-12-08 00:17

    I don't think the currently accepted answer is correct. You don't need to extend the layout under opaque bars to solve the issue.

    There is no code provided in the OP, but it is likely that the bottom of the view containing the items is constrained to the bottom of its superview, which would have taken the items underneath the translucent tab bar. To prevent this, a manual inset could have been set from the bottom. In short, the superview extends underneath the translucent bar and so did its subviews.

    As soon as the tab bar was made opaque, the root view (or the superview) only extended until the top of the tab bar.

    The 'more' correct fix would be to just remove the manual inset of content, not extending the view under opaque bars.

提交回复
热议问题