How can I get a tab-bar styled ornament on the trailing edge of a view controller?

I've got a UIKit app with a collapsible trailing-edge child view controller, implemented sort of like UISplitViewController but it's got a bunch of custom behavior - moving to the bottom edge in portrait orientation, etc. It exposes a couple of different app functions via a UITabBar on the bottom edge on iOS.

When I run the app on visionOS, that tab bar transforms to a leading-edge ornament. This would be great, but that means it tries to overlap the trailing-edge content of its parent view controller, which isn't ideal.

Is there a way to get the tab bar to lay out on the trailling edge of the child view controller? Or can I create a custom ornament that has the same auto-expand behavior as the tab bar, where it shows a vertical column of icons that expands to show titles when you're gazing at it?

Answered by Vision Pro Engineer in 810404022

It is not possible to change the edge on which the tab bar appears using a UITabBarController but you could create your own ornament using the UIHostingOrnament and hoverEffect APIs (see https://developer.apple.com/videos/play/wwdc2024/10152).

Accepted Answer

It is not possible to change the edge on which the tab bar appears using a UITabBarController but you could create your own ornament using the UIHostingOrnament and hoverEffect APIs (see https://developer.apple.com/videos/play/wwdc2024/10152).

How can I get a tab-bar styled ornament on the trailing edge of a view controller?
 
 
Q