ios - Add filter button to UISearchController -


i want add "filter" or "sort" button next searchbar inside uisearchcontroller. have tried add uibutton , searchbar uiview , set uitableview tableview.tableheaderview not work because tableview.tableheaderview get's set uisearchbar when dismissing controller. here example of how want look:enter image description here

instead of customising uisearchbar , complicating things, can keep simple adding own button beside searchbar.

set no shows cancel button option searchbar using

self.searchbar.showscancelbutton = true 

or

uncheck shows cancel button option searchbar in storyboard

enter image description here

add own button beside searchbar shown below

enter image description here

and accordingly add ibaction button , perform actions in it.

also in ideal case, not recommendable put view in header of tableview. better if above tableview followed apple.

enter image description here


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -