How the SwiftUI search tab changed in iOS 27

⋅ 3 min read ⋅ SwiftUI iOS 27 TabView

Table of Contents

In iOS 26, a search tab (Tab(role: .search)) sits apart from the rest of the tab bar, in its own circle.

In iOS 27, the same search tab stays inside the tab bar, with its "Search" title, like any other tab.

On iOS 26, the search tab gets its own circle. On iOS 27, it stays in the tab bar.
On iOS 26, the search tab gets its own circle. On iOS 27, it stays in the tab bar.

If you want the circle back, add one line: .tabViewSearchActivation(.searchTabSelection).

TabView {
Tab("Home", systemImage: "house") {
HomeView()
}
Tab(role: .search) {
SearchView()
}
}
.searchable(text: $query)
.tabViewSearchActivation(.searchTabSelection)

In this article, we will see the change side by side, how to get the iOS 26 look back, and the behavior changes that come with it.

iOS 26 vs iOS 27

The image at the top is the same app, built with Xcode 27, on iOS 26.5 and iOS 27.2. The code is a plain Tab(role: .search).

On iOS 26, you got the circle for free. Apple's Adopting Liquid Glass guide says the system "separates the search tab from other tabs and places it at the trailing end."

In iOS 27, Apple changed direction and made this behavior opt-in.

You can easily support sarunw.com by checking out this sponsor.

Sponsor sarunw.com and reach thousands of iOS developers.

How to get the iOS 26 look back

Add .tabViewSearchActivation(.searchTabSelection) next to .searchable.

.searchable(text: $query)
.tabViewSearchActivation(.searchTabSelection)

The search tab gets its own circle again, like in iOS 26.

On iOS 27, .searchable alone keeps the search tab in the bar. With .searchTabSelection, it gets its own circle.
On iOS 27, .searchable alone keeps the search tab in the bar. With .searchTabSelection, it gets its own circle.

Behavior change

The look isn't the only change. Two more things behave differently in iOS 27:

  • Where the search field shows up.
  • What happens with a prominent tab.

The search field moved

The search field shows up in a different place.

  • iOS 26: a tap on the search circle shows the search field at the bottom, in place of the tab bar.
  • iOS 27: the search tab is a normal page, and the search field sits at the top, under the title. In my testing, it was hidden until I pulled the list down.
  • iOS 27 with .searchTabSelection: the same as iOS 26, but the search field gets focus right away, so the keyboard comes up.

With a prominent tab

iOS 27 also adds TabRole.prominent, which gives the circle to any tab you choose. Only one tab can have the circle, and a .prominent tab wins. The search tab goes back into the bar, even with .searchTabSelection.

TabView {
Tab("Home", systemImage: "house.fill") {
HomeView()
}
Tab("Library", systemImage: "books.vertical.fill") {
LibraryView()
}
Tab("Add", systemImage: "plus", role: .prominent) {
AddView()
}
Tab(role: .search) {
SearchView()
}
}
.searchable(text: $query)
.tabViewSearchActivation(.searchTabSelection)

The Add tab comes before Search in the code, but the prominent tab always moves to the trailing edge, so Search ends up as the last tab in the bar.

iOS 27 with a .prominent tab: Add gets the circle.
iOS 27 with a .prominent tab: Add gets the circle.

You can easily support sarunw.com by checking out this sponsor.

Sponsor sarunw.com and reach thousands of iOS developers.

Conclusion

  • In iOS 27, a Tab(role: .search) stays inside the tab bar by default.
  • Add .tabViewSearchActivation(.searchTabSelection) to get the circle back. A tap then starts the search and brings up the keyboard.
  • A .prominent tab always takes the circle from the search tab.

If you want to learn more about search in SwiftUI, check out Searchable modifier in SwiftUI.


Read more article about SwiftUI, iOS 27, TabView, or see all available topic

Enjoy the read?

If you enjoy this article, you can subscribe to the weekly newsletter.
Every Friday, you'll get a quick recap of all articles and tips posted on this site. No strings attached. Unsubscribe anytime.

Feel free to follow me on Twitter and ask your questions related to this post. Thanks for reading and see you next time.

I also make short videos and visual guides on Patreon. Some things are easier to see than to read, like how an API looks and moves on a real screen. If you like to learn that way, come and watch. Sharing the article is also greatly appreciated.

Become a patron Tweet Share
Previous
How the search tab looked from iOS 18 to iOS 27

A quick timeline of the SwiftUI search tab, Tab(role: .search). A normal tab in iOS 18, its own circle in iOS 26, and back in the tab bar in iOS 27.

← Home