I have a UITableView in which i have added UISearchDisplayController on the header of the table view in xib.
When i run the project and click on search bar textfield which show cancel button. When i click on cancel button multiple times frequently then UISearchBar is disappear from the header of the table view.
You can download the sample app from below url.
https://www.dropbox.com/s/3ero6u76dceq4r7/SearchBarSample.zip?dl=0
Any help is much appreciated. Thanks!
You have taken the search bar inside tableview. Just take it out of the tableview. Search bar should be above in list. The problem will be resolved.enter image description here
Related
I need to change the text and action of the navigation item, currently, I am doing it by providing the bar button items. But my problem is when I click it, it shows click only on the item I clicked not all the items I have added to leftBarButtonItems.
I tried using a custom view(UIBarButtonItem(customView: UIButton())). But It becomes smaller and I was not able to resize it. Please see the below image to understand the problem I am having. This is the situation after clicking on the back button. Thanks for your time.
please use custom navigation bar
https://www.youtube.com/watch?v=zS-CCd4xmRY
I hope this is helpful for you
I have a view controller with a UISearchController that, when tapped, will expand and bring up the keyboard. I want the user to press a button (separate from the search controller), when then brings up the search bar without actually tapping it. Is this possible?
What you want to achieve is to make the searchBar become the first responder. You can do that with:
searchController.searchBar.becomeFirstResponder()
I am having UISearchBar in my iOS Table view application. I am able to search for words.
When I search for words, Search bar comes to front with full screen and greyed background of table view.
After searching, and clicked on cancel, still the greyed background doesn't disappear in the table view. Please see the screenshot below.
I have a problem with my UISearchDisplayController.
My view is build with a tableview and a uisearchdisplaycontroller on it.
When the user tap on the search bar (that is displayed inside the navigation bar) it opens and shows the suggestions (that are fetched via json).
When the user performs the search, tapping on "search" via the keyboard I need that when he taps on a result (that is on the table but with different cell style and identifier) the tap is recognized by the searchdisplaycontroller but not by my app code.
Notice that didSelectRowAtIndexPath: is not called when tapping, but instead my app shows again the search bar in editing mode.
How can I disable this behaviour?
I am developing an iPad app and I am trying to implement a series of drop down lists in my app. I have a custom button that is a cell on the UITableViewController. So whenever the button is tapped, it should show a list of options that the user can select and it should set the selected value as button's title. I tried to implement picker view but didn't like it on the iPad. I also tried to implement action sheet and pop over controllers but failed to get the result.
Of all the examples I referred to, it shows how to display popover controllers from bar button item on toolbar or navigation bar but I didn't find any which shows me the implementation for the custom buttons on tableview as one of the rows.
Can someone please guide me on this. If possible a sample code or a tutorial will be of great help.
Thanks for all your time.
I have placed my code in the following link. You can refer it.
problem in setting PopoverContentSize