Questions tagged [uisearchbardelegate]

The UISearchBarDelegate protocol defines the optional methods you implement to make a UISearchBar control functional.

The UISearchBarDelegate protocol defines the optional methods you implement to make a UISearchBar control functional. On UISearchBarDelegate, you can find the following methods:

Editing Text

– searchBar:textDidChange:

– searchBar:shouldChangeTextInRange:replacementText:

– searchBarShouldBeginEditing:

– searchBarTextDidBeginEditing:

– searchBarShouldEndEditing:

– searchBarTextDidEndEditing:

Clicking Buttons

– searchBarBookmarkButtonClicked:

– searchBarCancelButtonClicked:

– searchBarSearchButtonClicked:

– searchBarResultsListButtonClicked:

Scope Button

– searchBar:selectedScopeButtonIndexDidChange:

150 questions
0
votes
0 answers

clear text UISearchBar

I have a UISearchBar with some odd behaviour (iOS 7). These are the steps I take: 1) I do a search and select a result from the table. 2) I clear the search text with this code (either line) -(void) tableView:(UITableView *)tableView …
user965972
  • 2,489
  • 2
  • 23
  • 39
0
votes
1 answer

Search bar delegate - difference between searchBarShouldBeginEditing / searchBarTextDidBeginEditing?

What's the difference between them? In my experimentation, they seem to get called during the same action - once the user taps the search bar to bring up the keyboard. This is despite the user not having editing the actual text yet. Which seems to…
bpapa
  • 21,409
  • 25
  • 99
  • 147
0
votes
2 answers

Cannot access tableview cell UISearchBarController

I have a custom UITableView Cell. It contains a custom button with image that shows a check box which can be tapped to show a checked and unchecked image. It works correctly, but once filtering begins using UISearchBarController tapping my custom…
Joe Fratianni
  • 790
  • 8
  • 24
0
votes
1 answer

About UISearchBar:textDidChange of predicateWithFormat

I have a question,I don't know why Method 2 can't get value ? Method 1:can get value! -(void) searchBar:(UISearchBar *) searchBar textDidChange:(NSString *)searchText{ NSString *firstName = @"55566666666"; AllMainEventRows3 =…
SimonKira
  • 91
  • 1
  • 4
  • 13
0
votes
2 answers

UISearchBar Dismiss Method

For a UISearchBar with UISearchDisplayController, when the searchfield is clicked, the keyboard appears and an overlay shows over the tableview. When cancel is clicked - (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar is called. I am…
JeffN
  • 1,575
  • 15
  • 26
0
votes
1 answer

uisearchbar perfomance issue textDidChange

I am working on search functionality in my application, I am having list of items based on predicate i am writing the search operation. Search will be based on each character, While doing this search keyboard is responding very late, I am doing…
kiri
  • 1,977
  • 5
  • 27
  • 55
0
votes
3 answers

Open a detailViewController after use of UISearchBar

I have a UISearchBar to search some data in a tableView and then, after searching, selecting a row to open a detailViewController . To do this it is necessary that the lines keep the index path and do not change the initial indexPath after the…
Ortensia C.
  • 4,666
  • 11
  • 43
  • 70
0
votes
1 answer

UISearchBarDelegate on UITableView with Sections Issue

I'm having issues with implementing the UISearchBarDelegate on my UITableView with sections issue where every time I try to search for something inside the UITableView, either it doesn't display the desired result or it crashes the app with an error…
jaytrixz
  • 4,059
  • 7
  • 38
  • 57
0
votes
2 answers

Searching a tableview without using UISearchBar

I am writing a phone-like app with a custom numeric keypad. I would like to search through my contacts for name/phone number as I type on the numeric keypad and displaying the results in a small tableview above the numeric keypad. I therefore would…
0
votes
1 answer

How to reset UISearch from Appdelegate method applicationWillEnterForeground

I want to reset my UISearch when app is entering background, or entering foreground again. It would be enough when the tableview from UISearch gets hidden. But when I try to hide it from AppDelegate.m it doesn't work. I have also logged the…
brush51
  • 5,691
  • 6
  • 39
  • 73
0
votes
1 answer

Delegate Methods Not Firing on Search Results Table

All, I have a UITableView w/detail, with a Search bar, created from code. Works fine on selected items except it doesn't work when an item is clicked from the search results; no delegate methods fire. Never seen this type of behavior before so I…
Slinky
  • 5,662
  • 14
  • 76
  • 130
-1
votes
4 answers

SWIFT UISearchBar Text Aligned incorrectly from right to left

Im trying to set an left to right aligned searchbar text programmatically but it seems like it adds the text on the opposite direction (like english) and then there are no results from the search. thanks for anyone helping.
Erik17
  • 33
  • 4
-1
votes
4 answers

DidSelectRow method not called

Hi guys I have been trying for few days no answer found . I have already implemented UITableViewDelegate and UITableViewDataSource before raising this question my didSelectRowAt and didDeselectRowAt, both the methods are not working. class…
Sabhay Sardana
  • 876
  • 1
  • 10
  • 27
-1
votes
1 answer

Searching the database entries for a String using Objective C

I'm trying to search the text entered by the user in the searchbar to check if that text is contained by any of the database entries and want to store the result into a NSMutableArray - (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar { …
Vaibhav Jhaveri
  • 1,579
  • 3
  • 28
  • 53
-2
votes
1 answer

Binary operator '==' cannot be applied to operands of type 'Slice>' and '[[String : AnyObject]]' UISearch

In Swift 4, I'm trying to compare the length of the text of an UISearchBar textfield with a minimum length: @objc var arrRes = [[String:AnyObject]]() var searcharr = [String]() private func searchBar( searchBar: UISearchBar, textDidChange…
Nishad
  • 203
  • 1
  • 2
  • 9
1 2 3
9
10