Sample swiftUI project for a search bar realized completely in swiftUI used as answer to this stackoverflow question
The search bar incorporates
- a magnifying glas icon,
- a clear button,
- a cancel button,
- resigning keyboard on dragging in the list and
- hiding the navigation view when the search text field is selected.