Questions tagged [uisearchdisplaycontroller]

UISearchDisplayController is part of Apple's UIKit framework. It greatly simplifies adding UISearchBars to UITableViews.

A UISearchDisplayController manages the display of a search bar, along with a table view that displays search results.

You initialize a search display controller with a search bar and a view controller responsible for managing the data to be searched. When the user starts a search, the search display controller superimposes the search interface over the original view controller’s view and shows the search results in its table view. The searchDisplayController was deprecated in iOS version 8.0

References:

822 questions
14
votes
6 answers

Cursor invisible in UISearchBar iOS 7

I have UISearchBar in UITableView as a table header. When I push the UISearchBar for start searching, this method is being triggered - (BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar for UISearchDisplayController. But result is like…
Kemal Can Kaynak
  • 1,638
  • 14
  • 26
14
votes
1 answer

IOS7 Status bar change to black after search is active

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
9891541
  • 251
  • 3
  • 14
14
votes
9 answers

iOS 7 - UITableViewController with search is under status bar

I have a UITableViewController with an imbedded UISearchDisplayController. In iOS 7 the search box is under the status bar. Is there a way in interface builder to offset the tableview so that the search bar is not covered by the status bar (and…
datinc
  • 3,404
  • 3
  • 24
  • 33
13
votes
2 answers

How can I determine if a UISearchDisplayController's searchResultsTableView is visible?

I have a UISearchDisplayController that is in the headerview for my UITableView. I want to know when the UISearchDisplayController's searchResultsTableView is shown so I can do some other operation: if(self.tableView ==…
13
votes
6 answers

UISearchBar moves down 20 pixels

I have a UITableViewController T that contains a UISearchDisplayController and UISearchBar in the standard way (everything defined in a nib). T is then contained as a child view controller in the standard way by some other view controller. The…
Colin
  • 3,670
  • 1
  • 25
  • 36
13
votes
4 answers

Custom CellIdentifier is Null When Using Search Display Controller

In my tableview have custom cells that I initialize from a UITableViewCell class. I have sections for first letters of records and have an indexPath that is being created dynamically. I wanted to add a search display controller to my tableview. So…
kubilay
  • 5,047
  • 7
  • 48
  • 66
12
votes
3 answers

iPhone SDK: Setting the size of UISearchDisplayController's table view

My app's table view does not occupy the full screen height, as I've allowed 50px at the bottom for a banner. When I begin typing in the search bar, the search results table view is larger; it fills all available screen space between the search bar…
Chris Newman
  • 2,240
  • 2
  • 24
  • 30
12
votes
1 answer

Crash when searching in two section

I have a NSFetchedResultController with different section. I have a crash when I try to search using UISearchDisplayController : *** Assertion failure in -[UITableViewRowData rectForRow:inSection:],…
12
votes
7 answers

Show a preloaded search results?

I have a non-tableview view with a searchbar in it, and while it works perfectly, the search display controller hides the table view and overlays a dark dimmed view when an empty string is in the searchbar. I want it to show a preloaded data when…
Dennis
  • 3,506
  • 5
  • 34
  • 42
11
votes
1 answer

Creating a UISearchDisplayController programmatically

I'm trying to create a UISearchDisplayController programmatically. I have a method which should set up my search controller, but when I call it, nothing happens. This my -setupSearch method: - (void)setupSearch { UISearchBar *myBar; …
v1Axvw
  • 3,054
  • 3
  • 26
  • 40
11
votes
4 answers

Focus on the UISearchBar but the keyboard not appear

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…
11
votes
3 answers

How to set text in UISearchBar without activating UISearchDisplayController

I'm using a UISearchDisplayController in my app. When the user selects an item in the search results returned I deactivate the UISearchDisplayController. Deactivating the controller clears the text the user has typed. I want to keep it there. I…
Josh Knauer
  • 1,744
  • 2
  • 17
  • 29
11
votes
3 answers

UISearchBar automatically resizes and changes frame

I have an issue with a search bar that behaves in a strange way when it becomes a firstResponder and when it resigns. The search bar is added as the header of a table view self.searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0.0f, 0.0f,…
Moxy
  • 4,162
  • 2
  • 30
  • 49
11
votes
2 answers

UISearchBar clipped under status bar when added to UISearchDisplayController

I want my search bar to draw its background extended upwards below the status bar like this: This is the corresponding code for the image above: - (void)viewDidLoad { [super viewDidLoad]; self.searchBar = [[UISearchBar alloc] init]; …
albertamg
  • 28,492
  • 6
  • 64
  • 71
11
votes
6 answers

UISearchDisplayController not correctly displaying custom cells

So I have a tableView that has sections and rows, and it uses a custom cell class. The custom cell has an image view and a few labels. The table view works fine, and the search works, except the search does not display any of the labels that are in…
1 2
3
54 55