UITabBar focuses and moves view layout on tvOS

One common way to use Apple AppleTV applications (such as movies and television shows) is that they start with a visible UITabBar, and all the content in the view is displayed in the space under the tab bar. When the focus moves from the tab bar to some content on the screen, the tab bar will shift from the top of the screen and the content will move / scroll up to fill the space that is now available. This process changes its meaning if the tab bar appears again.

Is there an easy way to accomplish this behavior (e.g. a checkbox or something?), Or should I implement the method didUpdateFocusInContext:withAnimationCoordinator:in different places and manually adjust the frames or scroll through the contents or something else?

+4
source share
1 answer

Select the tab bar object in the tab bar scene in the storyboard mode, and clear the Transparent check box. Elements in views should now move up as the tab bar moves up.

The UITabBar class also has the property translucent

+5
source

Source: https://habr.com/ru/post/1615465/


All Articles