我能怎么隐藏 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:

  1. 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.

  2. 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.