What’s new in iOS tabview?

Asked on 08/03/2024

1 search

In iOS 18, there are several new features and updates for the tab view:

  1. New Syntax in SwiftUI:

    • A new type-safe syntax has been introduced to make it easier to catch common errors at build time. You now declare a tab struct with a title, image, and its content view. Optionally, you can include a selection value in the tab to enable programmatic selection. This ensures that all tabs have the same selection type and that the type matches the tab view itself.
    • The tab bar now floats above the content, and users can customize the experience by reordering items and hiding infrequently used options. The new sidebar adoptable tab view style allows switching between the tab bar and the sidebar view. (What’s new in SwiftUI)
  2. UIKit Updates:

    • New APIs in UIKit allow better description of your app hierarchy to UITabBarController. You can create UITab to represent each top-level section of the app and assign them to the tabs property on the tab bar controller. Changes made to the UITab instance are reflected immediately where the tab is displayed.
    • The tab bar has been refreshed with a new compact look that reduces unused vertical and horizontal space, bringing more content to the forefront. (What’s new in UIKit)
  3. Customization Features:

    • Items in the tab bar can be customized through drag and drop, either by adding from the sidebar or dragging them off. Tabs have a preferred placement to determine their customization and visibility preferences. The tab bar contains three sections: fixed, customizable, and pinned. (Elevate your tab and sidebar experience in iPadOS)
  4. Platform Considerations:

    • On visionOS, the tab bar displays in an ornament on the leading edge of the window for root tabs. The system will automatically select the filled variant for symbols when displayed in the tab bar, just like on iOS. (Elevate your tab and sidebar experience in iPadOS)
  5. Zoom Transition:

    • A new zoom transition works with both navigation and presentations, and it is continuously interactive, allowing you to grab and drag it around from the beginning or during the transition. (What’s new in UIKit)

Relevant Sessions