I want to customize “No Results” string in UISearchDisplayController. In documentation you can find that UISearchDisplayController has property searchResultsTitle that as I thought should change this string, but it doesn’t work.
Please help with customization “No Results” string in iOS 5 and above. And why searchResultsTitle doesn’t work?
I want to customize No Results string in UISearchDisplayController . In documentation you can
Share
The
searchResultsTitleproperty ofUISearchDisplayControllerdoes not actually controls the No Results text. If you look at the instance variables ofUISearchDisplayControlleryou will see both_resultsTitleand_noResultsMessage. The_noResultsMessageis what controls the No Results text but has unfortunately no public property.You can nevertheless set a custom message with this code using the undocumented instance variable:
As for
searchResultsTitle, the documentation is so scarce that I have no idea what it controls!