The search bar is a very simple action in the UI, drag a search bar.
The more important property in the search bar is the placeholder, which is the placeholder on the right side of the graph, such as entering "Please enter keywords", as shown below:
This is the setting of the background color:
The options option makes some adjustments to the search box:
For example, if we select the first item, a drop-down arrow will appear:
Next look at this section:
There are some interesting options in this, such as this keyboard type, when we enter the page input characters and numbers, when we enter the phone number can only enter the number, that is, with this option.
And this return Key, we can click to see:
This includes a number of popular search sites.
If you want to do something about the search, just implement the callback method Uisearchbardelegate
Swift UI special training Searchbar Search bar