uisearchdisplaycontroller

How do I select multiple table rows from filtered results of a Searchbar and SearchDisplayController?

自闭症网瘾萝莉.ら 提交于 2019-12-02 01:17:40
I understand that UISearchDisplayController got deprecated in iOS 8.0 but there's not a lot of good documentation around the new UISearchController so I used the former instead. Do bear with me. Right now, I'm using XIB files. I know that for a regular tableview, you can allow multiple cell selection by going inside the XIB and and selecting Multiple Selection from the dropdown under "Selection". But how can I make this possible in the filtered search results from a UISearchBar? I understand that technically, I have two separate tableviews basically. In this scenario, I can use multi-cell

How to implement SearchBar and search display controller in tableview in xib [duplicate]

 ̄綄美尐妖づ 提交于 2019-12-01 22:59:17
问题 This question already has answers here : how to add searchbar in uitableview? (4 answers) Closed 6 years ago . I have mutable array with dictionaries.I`am displaying that array in table view. Now i want to implement search and display controller to table view. How? Any suggestions or code.. Here my array i`am displaying "name" key in uitableview as alphabetically order. [ { "name": "Fish", "description": "sdhshs", "colorCode": null, }, { "name": "fry", "description": "sdhshs", "colorCode":

How to show tableview when user taps searchbar swift

别等时光非礼了梦想. 提交于 2019-12-01 18:43:06
I need a tableview to be presented modally after user taps on the search bar, and then be able to have the tableview present things the user searched, like Instagram's search function. There are plenty of tutorials on google about how to make a search feature, but none about how to present a tableview after the user taps on the search bar. How should I do that? To make the search results of a UISearchController appear in a new UITableView of your choice, do this: let searchController = UISearchController(searchResultsController: myTableViewController) instead of this: let searchController =

UISearchDisplayController hiding navigation bar

徘徊边缘 提交于 2019-12-01 01:17:46
I am seeing a weird situation. I have put a search bar in the navigation bar and have linked a UISearchDisplayController with the search bar. Now, the search display controller tends to hide the navigation bar when the user clicks on the search bar (therefore, hiding the search bar also). In order to counter that, I subclassed UISearchDisplayController and implemented the following code :- - (void)setActive:(BOOL)visible animated:(BOOL)animated { [super setActive: visible animated: animated]; [self.searchContentsController.navigationController setNavigationBarHidden: NO animated: NO]; } Now,

How to implement search in a table view (with FRC)

耗尽温柔 提交于 2019-11-30 23:23:24
The basics are simple: just implement <UISearchBarDelegate,UISearchDisplayDelegate> in your table view controller. Here is an adequate tutorial . The trick is to realize that there are TWO controllers: a table view controller, and a search display controller. Each controller has its own table view. Hence TWO table views are in play: the normal table view and the search display table view. When delegate methods have a UITableView argument, diff which table view is passed in, and do different things accordingly. Beyond above basics, data structure becomes a main challenge for me. More specific,

UISearchDisplayController hiding navigation bar

≯℡__Kan透↙ 提交于 2019-11-30 19:28:52
问题 I am seeing a weird situation. I have put a search bar in the navigation bar and have linked a UISearchDisplayController with the search bar. Now, the search display controller tends to hide the navigation bar when the user clicks on the search bar (therefore, hiding the search bar also). In order to counter that, I subclassed UISearchDisplayController and implemented the following code :- - (void)setActive:(BOOL)visible animated:(BOOL)animated { [super setActive: visible animated: animated];

How to implement search in a table view (with FRC)

…衆ロ難τιáo~ 提交于 2019-11-30 18:41:28
问题 The basics are simple: just implement <UISearchBarDelegate,UISearchDisplayDelegate> in your table view controller. Here is an adequate tutorial. The trick is to realize that there are TWO controllers: a table view controller, and a search display controller. Each controller has its own table view. Hence TWO table views are in play: the normal table view and the search display table view. When delegate methods have a UITableView argument, diff which table view is passed in, and do different

UISearchDisplayController's full-screen background intercepts touch events in iOS 7

这一生的挚爱 提交于 2019-11-30 15:37:37
问题 I have a UITableview that doesn't take up the whole screen (screenshot). Everything worked fine in iOS 6. But in iOS 7, when the user searches, the search result table takes up the whole view (screenshot). To fix this, I tried setting the frame manually as described in this answer. The appearance is now correct (screenshot), but now the "<" button in the top left doesn't receive tap events when the search results table is displayed. It seems the searchResultsTableView is adding a full-screen

UISearchDisplayController's full-screen background intercepts touch events in iOS 7

守給你的承諾、 提交于 2019-11-30 14:52:50
I have a UITableview that doesn't take up the whole screen ( screenshot ). Everything worked fine in iOS 6. But in iOS 7, when the user searches, the search result table takes up the whole view ( screenshot ). To fix this, I tried setting the frame manually as described in this answer . The appearance is now correct ( screenshot ), but now the "<" button in the top left doesn't receive tap events when the search results table is displayed. It seems the searchResultsTableView is adding a full-screen background view that is intercepting touch events. To prove this, I added this code to

IOS7 Status bar change to black after search is active

夙愿已清 提交于 2019-11-30 11:34:05
I'm using UISearchBar as header of UITableView. UISearchBar style is UISearchBarStyleMinimal. And when search is active, status bar change to black. How to fix that? Before search is active Search is active you just need to do this: self.navigationController.view.backgroundColor = [UIColor lightGrayColor]; 来源: https://stackoverflow.com/questions/19129540/ios7-status-bar-change-to-black-after-search-is-active