how to add the search tab in tabbar

Asked on 06/12/2025

@wwdc25

1 search

To add a search tab in the tab bar of your app, you can follow the guidance provided in the WWDC sessions:

  1. UIKit: In the session "Build a UIKit app with the new design," it is mentioned that you can include a distinct tab for search in the tab bar. When the search tab is tapped, the search button expands into a search field, and the other buttons collapse. To have the search field activate automatically when the search tab is tapped, set automaticallyActivateSearch to True on that tab. This approach is ideal for making search suggestions available and providing a dedicated search experience. You can find more details in the Build a UIKit app with the new design session.

  2. SwiftUI: In the session "Build a SwiftUI app with the new design," it is suggested to set a search role on one of your tabs and place a searchable modifier on your tab view. When someone selects this tab, a search field takes the place of the tab bar, and the content of the tab is shown. This pattern is used across platforms and provides flexibility and control over the search experience. More information can be found in the Build a SwiftUI app with the new design session.

These sessions provide comprehensive guidance on integrating a search tab into your app's tab bar, whether you are using UIKit or SwiftUI.

how to add the search tab in tabbar | Ask WWDC