How to get iOS search control and toolbar buttons to coexist?

In a number of iOS apps, we see toolbar buttons coexisting with a search control. e.g. the attached screenshot is of the Contacts app.

In the attached demo project, adding a MobileToolbarButton to a MobileScreen that contains an iOSMobileTable that has “Allow Search” enabled results in the search control not being displayed.

How can I get a toolbar button to coexist with the search control?

2026-07-23 iOS toolbar test.xojo_binary_project.zip (5.6 KB)

I recently added this to iOSDesignExtensions.

This is the code you will need:

Var tbsearch As MobileToolbarButton = self.GetSearchBarPlacementBarButtonItemXC

self.Toolbar.AddButton tbsearch

//adding a spacer

self.Toolbar.AddButton new MobileToolbarButton(MobileToolbarButton.Types.Space)

Dim tb As new MobileToolbarButton(MobileToolbarButton.Types.Add)

self.Toolbar.AddButton tb

Thanks, @Jeremie_L : that’s really helpful

1 Like

Make sure you adapt the code for versions prior to iOS26 :slight_smile: