Reputation: 161
I want to develop a simple dictionary application which is like the Search tab of AppStore on iPhone:
When user touches the SearchBar, the bottom view is gray. Touching the gray area to leave the Seach text-box and my user is able to click on one of history words.
I know how to work with SearchBar and TableView to display the suggestion words list but don't know what to do to implement other things:
Thanks for reading and please show me some keywords, clues to solve three issues above.
Many thanks!
Upvotes: 1
Views: 937
Reputation: 1029
Use UISearchController
to create a page like you wanted.
It has dimsBackgroundDuringPresentation
property to make a backgroundView gray when user is typing.
It has - (instancetype)initWithSearchResultsController:(UIViewController *)searchResultsController
method. You can initialize the UISearchController
with resultsController. For results you can do whatever you want.
Lastly, you can set a custom view to see "History words" to UISearchController
Upvotes: 1