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
2 answers

Search bar delegate

Here is my code : - (void)searchTextDidChange:(TaggingSearchBar *)searchBar text:(NSString *)searchText { NSArray *allPlayers = self.sessionModel.taggingModel.PlayersFromDatabase; [self.filterdPlayers…
hds
  • 33
  • 1
  • 8
0
votes
0 answers

Search bar object nil in UISearchBar textDidChange delegate

I have faced a very strange behavior for textDidChange delegate method of UISearchBar. Here is my code - (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText { searchText = [searchText…
Arun
  • 1,391
  • 1
  • 10
  • 29
0
votes
1 answer

UISearchBar not firing

I put my UISearchController's search bar on navigation bar's titleView. But when I tap to search, UISearchBar does not respond. What can be the cause ? let tvController:UITableViewController = UITableViewController() …
uahakan
  • 576
  • 1
  • 6
  • 23
0
votes
2 answers

SearchBar & Display in table view with Coredata using Swift?

I am new to iOS development and am in my second app with Swift. I am unable to incorporate SearchBar & Display search in my Table view controller. There are 2 views in my app. First View generates an Array of fruits. Output of First View: [Apple,…
0
votes
0 answers

Remove iOS UISearchBar Animation

The animation a search bar in iOS runs when you select it is very slow on the iPhone 4s (which I want to support). Is there any way to remove that animation?
David Baez
  • 1,208
  • 1
  • 14
  • 26
0
votes
1 answer

UIsearchbar show a line below it which never goes

I have a UISearchBar whose bartintcolor i have changed and have cancel enabled. This is added as a subview of a UIVew. whenever make search bar visible, it shows a black line below it which never goes away. Am i missing something about UISearchbar…
0
votes
0 answers

UISearch starts before complete search term entered

This is my code: -(void)searchBar:(UISearchBar*)va textDidChange:(NSString*)text { NSPredicate *predicate; // what are we searching for? if(doExactSearch == NO) { if( [oSearchByISBN isSelected]) predicate = [NSPredicate…
SpokaneDude
  • 4,856
  • 13
  • 64
  • 120
0
votes
1 answer

searchDisplayController dim view stays after first search

I am using searchDisplayController for search functionality. On the click of the search button, I do folowing thing: [mySearchBar becomeFirstResponder]; First time, everything works fine. I do following in searchDisplayControllerDidEndSearch (which…
0
votes
1 answer

UISearchController TableView Not Updating when Using Search bar to filter array

I'm using the search bar to grab the text the user inputs and then use that to filter through an NSArray, and then assign the newly constructed array to the specified class' array property. Code below:…
Vimzy
  • 1,871
  • 8
  • 30
  • 56
0
votes
1 answer

Use a predicate to search a NSMutableArray of Objects

I have a collection of contacts I would like to filter: var arraycontacts: NSMutableArray = [] arraycontacts contains a large list of FriendModel Objects: var friend = FriendModel( name: self.contactName(contact), phone:…
0
votes
1 answer

Problems Implementing Search Bar with Parse Data

I have searched the land of Google far and wide and I have found tutorials on this, but they are before IOS8. I have tried to piece this together as best as I can, but yet when the app runs, and I type words into the search bar, nothing returns, or…
0
votes
3 answers

Execute code once in SearchBar textDidChange delegate

I want to execute certain code (only once) when user enters three or more character in searchbar. I have used below code : - (void) searchBar:(UISearchBar *)theSearchBar textDidChange:(NSString *)searchText { if ([searchText length] >= 3)…
Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177
0
votes
1 answer

How to programmatically change scope selected in searchbar?

I want to change the selected scope after user has selected something from a table view. I have tried this: for (id view in [self.searchDisplayController.searchBar subviews]) { if ([view isMemberOfClass:[UISegmentedControl class]]) { …
0
votes
1 answer

Objective C - searchBarSearchButtonClicked delegate of UIsearchBar not being called after adding shouldChangeTextInRange

I am trying to implement UISearchBar delegate -(BOOL)searchBar:(UISearchBar *)searchBar shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)string{ NSCharacterSet *set = [[NSCharacterSet…
Hassy
  • 5,068
  • 5
  • 38
  • 63
0
votes
1 answer

`UISearchDisplayController` SearchTableview didSelectRowAtIndexPath not working?

I m using UISearchDisplayController in my one of screen of iphone application.my need is to see only a UISearchDisplayController as user type in uisearchbar it will load the searchtableview and show data.now my problem is everything is going gud but…
1 2 3
9
10