uisearchdisplaycontroller

UISearchBar with UISearchDisplayController animates outside screen

不羁的心 提交于 2019-12-03 20:47:31
I have standard iPad view controller which has a custom navigation bar at the top. In the xib-file I've added a UISearchBar aligned to the right edge of the view. The search bar is 320px in width. I init a searchdisplaycontroller like this: // Search display controller self.mySearchDisplayController = [[UISearchDisplayController alloc] initWithSearchBar:_searchBar contentsController:self]; _mySearchDisplayController.delegate = self; _mySearchDisplayController.searchResultsDataSource = self; _mySearchDisplayController.searchResultsDelegate = self; The problem is that when I press the search bar

UISearchDisplayController automatically creates a UIPopovercontroller to display content search result ?! How to dismiss it?

ぃ、小莉子 提交于 2019-12-03 14:37:51
问题 I'm using a UISearchDisplayController with a UISearchBar. I put this UISearchBar in my app using IB and I get : alt text http://img6.imageshack.us/img6/1985/screenshot20100701at156.png Fine : when you start taping, the result popovercontroller appears magically (I didn't write anything on my own to make it appear !) Then, when a row is clicked among the result, I want to dismiss the PopoverController BUT at this stage, I never instantiated the UIPopoverController on my side : it looks like if

Customizing search bar in iPhone application Development

一世执手 提交于 2019-12-03 13:59:05
问题 In my application I have to add a search bar at the head of the tableview. I am able to add the searchbar but problem is without adding default search bar of ios can i add my customize search bar?? I am giving an image to see what types of search bar will be there... 回答1: you can subclass the UISearchBar and override the layoutSubviews method : - (void)layoutSubviews { UITextField *searchField; NSUInteger numViews = [self.subviews count]; for(int i = 0; i < numViews; i++) { if([[self.subviews

Focus on the UISearchBar but the keyboard not appear

家住魔仙堡 提交于 2019-12-03 11:36:01
I've read so many solution on how can i focus a searchbar to make keyboard appear when i open my search view, and all of that are like this [searchBar becomeFirstResponder]; mine is [self.searchDisplayController.searchBar becomeFirstResponder]; but I tried both. Now, I tried this, and I also added a [self.searchDisplayController setActive:YES]; because I'm using a SearchDisplayController, but so far the best result i can have is to have the cursor on the searchbar, the uitableview with an overlay on it, but still no keyboard. If I run the simulator I can type on the searchbar with my computer

UISearchController doesn't hide view when pushed

让人想犯罪 __ 提交于 2019-12-03 10:50:53
I am using UISearchController to display a search bar and results within a UITableView. I managed to set it up correctly, but when I search the results and then select one of the rows in the tableview, and push a new view controller to the navigation stack, I would expect the search bar to not be visible anymore. However, when I try this, the search bar from the first view controller is visible in the 2nd view controller: if (self.searchController == nil) { self.searchController = [[UISearchController alloc] initWithSearchResultsController:nil]; self.searchController.searchResultsUpdater =

UITableView content overlaps Status Bar when UISearchBar is active

喜欢而已 提交于 2019-12-03 10:35:23
问题 I have a UITableViewController with a UISearchBar and UISearchDisplayController. That exists inside a Container View in a UIViewController which is in a UINavigationController. I made this image to help describe the structure: This is what it really looks like: When I tap the Search Bar, I have to hide the Nav Bar. Normally, this would happen on its own, but since my UITableViewController is inside a Container View, I have to handle that change myself. This is what it looks like then, note

UISearchDisplayController “No Results” text [duplicate]

大兔子大兔子 提交于 2019-12-03 07:53:05
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How can I change strings of “Cancel” button, “No Results” label in UISearchBar of UISearchDisplayController? In my UISearchDisplayController, I want to change the font of the "No Results" text that appears in the searchResultsTableView when no results are available. How can I do this? 回答1: You question may be a duplicate of How can I change strings of "Cancel" button, "No Results" label in UISearchBar of

UISearchDisplayController—why does my search result view contain empty cells?

筅森魡賤 提交于 2019-12-03 07:49:44
I am about to go out of my mind here, in my Core Data databse I have a lot of users, i have hooked the database up to a tableviewcontroller via NSFetchedResultController, and when the view loads, I see all my users, and i can perform a push to a detail viewcontroller via storyboard segue... so far so god, my tableview contains a custom cell with an image view and 2 uitextlabels that all has their tag values assigned.. Now, when I perform the search I create a new NSFetchedResultController with a predicate, and performs the performFetch.. I then get the fetchedObjects property and it contains

Reloading UITableView behind UISearchDisplayController

a 夏天 提交于 2019-12-03 05:18:53
I've run into this really strange phenomenon that I can't quite figure out. I have a UITableViewController that manages a UITableView. Pretty simple. I also have a UISearchDisplayController for searching the contents of the table view. The searching functionality will be able to delete items of the content displayed by the table view. So if the user chooses to delete one of the items they found while searching, I want to not only reload the UISearchDisplayController's table view but also the UITableViewController's table view. When I do that, the sections of the regular table view pop out and

UISearchDisplayController with displaysSearchBarInNavigationBar pushes result view down with navigationBar.translucent = false

∥☆過路亽.° 提交于 2019-12-03 05:03:02
问题 I am using a UISearchDisplayController with the new ios 7 feature displaysSearchBarInNavigationBar and opaque navigation bars. The search display controller seems to position it's view incorrectly. I tried plugging in to delegate methods and repositioning but I can not get the initial position correct, nor when rotating. In addition, this seems like a sloppy solution. 回答1: Just enabled "Under Opaque Bars " in the storyboard for your view controller or if you like to code.Then add the below