Searching in iOS

In iOS you have a few different options when implementing searching. This is one example that uses the "UI Search Controller". Some things to point out here:
* The search bar (text field where you search) can easily be embedded in the top navigation bar. This is built-in functionality.
* By default, the table of search results will NOT show until the user starts typing into the search bar. But we can change this with one line of code.
* The table of search results is actually a whole new screen that shows over the original screen.
* You have to set the tint color of your search bar so the "Cancel" button that shows matches your color scheme.
* You can see the matching search text in the results is bold. This is NOT built-in functionality. But it can be added with a few lines of code.

As always, my patrons have access to this and 70 other projects at:
https://www.patreon.com/posts/uisearchcontroll-26661503

More by Mark Moeykens

View profile