我能怎么隐藏 navigationbaritem 或者 把 UItabbar 变成老的效果吗? 不要玻璃的效果
Asked on 06/12/2025
1 search
To hide a UINavigationBarItem
or change the UITabBar
to have a non-glass effect, you can consider the following approaches based on the latest updates from WWDC:
-
Hiding Navigation Bar Items: You can manage the visibility of navigation bar items by directly manipulating the
UINavigationItem
. Assign or remove items as needed to control their visibility. For more detailed control, you can use attributed strings and custom views to adjust the appearance of titles and subtitles in the navigation bar. This is discussed in the session Build a UIKit app with the new design. -
Changing UITabBar Appearance: The new design in iOS 26 introduces a "Liquid Glass" appearance for tab bars, which is translucent and dynamic. If you want to revert to a more traditional look, you might consider using the "hard edge" style for a denser UI with a lot of floating elements. This style provides a similar appearance to the standard bar backgrounds in iOS 18. You can enable it by setting the style of the edge effect. More details can be found in the session Build a UIKit app with the new design.
For more comprehensive guidance, you might want to explore the sessions "Build a UIKit app with the new design" and "Elevate your tab and sidebar experience in iPadOS" to understand the new design paradigms and how to customize them to fit your needs.

Build a UIKit app with the new design
Update your UIKit app to take full advantage of the new design system. We’ll dive into key changes to tab views, split views, bars, presentations, search, and controls, and show you how to use Liquid Glass in your custom UI. To get the most out of this video, we recommend first watching “Get to know the new design system” for general design guidance.

Elevate your tab and sidebar experience in iPadOS
iPadOS 18 introduces a new navigation system that gives people the flexibility to choose between using a tab bar or sidebar. The newly redesigned tab bar provides more space for content and other functionality. Learn how to use SwiftUI and UIKit to enable customization features – like adding, removing and reordering tabs – to enable a more personal touch in your app.

Platforms State of the Union
Discover the newest advancements on Apple platforms.