The UISearchBarDelegate protocol defines the optional methods you implement to make a UISearchBar control functional.
I've dug around stackoverflow and found the solution which I converted to Swift, it doesn't seem to work and the …
ios swift uisearchbar uisearchbardelegate