Anime with TabView

In vision OS, the tab bar of TabView is outside the window by default.

If I switch a page without TabView to a page that needs TabView in my program, the tab bar will suddenly appear on the left side of the screen without any animation. I hope it has an animation when it appears (such as easeIn, move). I tried it in Tab. Other animation-related modifiers such as animation are added under View, but there is no animation in the tab bar. Only the view in the tab has an animation effect, but this is not what I want. What I want is that the tab bar outside the window can have animation. What should I do?

Answered by Vision Pro Engineer in 794382022

Usually a TabView will be at the root view of your app, but maybe you have a good use case for doing this differently. Could you file an enhancement request in Feedback Assistant for this and post the Feedback ID? It'd be also very helpful to get screenshots and/or videos if possible (posted either here or in the feedback) to understand exactly what you're trying to do.

As a workaround, you can try to manually hide the tab bar when the TabView appears and then make it visible with animation, using the .toolbarVisibility(_:for:) modifier.

Accepted Answer

Usually a TabView will be at the root view of your app, but maybe you have a good use case for doing this differently. Could you file an enhancement request in Feedback Assistant for this and post the Feedback ID? It'd be also very helpful to get screenshots and/or videos if possible (posted either here or in the feedback) to understand exactly what you're trying to do.

As a workaround, you can try to manually hide the tab bar when the TabView appears and then make it visible with animation, using the .toolbarVisibility(_:for:) modifier.

Anime with TabView
 
 
Q