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
5
votes
4 answers

Use NSFetchedResultsControllerDelegate to update TableView sections & rows after NSPredicate change

Is there a way to update a UITableView sections and rows after changing the fetchedResultsControllers NSpredicate (and executing the fetch)? I would like to use controllerWillChangeContent delegate methods to update my table when the searchText in…
5
votes
1 answer

searchBarSearchButtonClicked Not Being Called Despite Delegate being set

Ok, I'm pulling my hair out over this. I'm almost certain I had this working at one point too, and now it isn't working. I have a UISearchBar embedded in a table view cell. I have the search bar declared as a property, my view controller is set up…
Bill Burgess
  • 14,054
  • 6
  • 49
  • 86
5
votes
6 answers

iOS7 UISearchBar cancel button text not showing. Button appears invisible

I am hoping this is an easy question. I have a search bar that shows a cancel button: - (void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar{ [searchBar setShowsCancelButton:YES animated:YES]; } Only problem is that the text on the…
denvdancsk
  • 3,033
  • 2
  • 26
  • 41
5
votes
1 answer

searchBarSearchButtonClicked not firing

I have researched this question. Looks like this is a common question but nothing I have tried has worked. I am very new to iPhone app development and Objective C. All I want to do at this point is type in a string in a search bar field and return…
user2350993
  • 51
  • 1
  • 4
4
votes
2 answers

How can I hide the UITableView that UISearchBar created?

In my iPhone application I have a search bar and search display controller. When the user types something in the search box, the table view loads and is now visible. When a user clicks on a row, I would like to get rid of the tableView and go back…
4
votes
1 answer

How to reset seachDisplayController View to original state programatically

I have the UISearchDisplayController page view as follows (original state) After clicking on the searchbar and typing some search term, I get a list of results in the table After clicking on an entry in the table, a new viewController is displayed…
Zhen
  • 12,361
  • 38
  • 122
  • 199
4
votes
3 answers

UISearchBar not responding when clicked

I've been trying to find the solution for hours, but alas no dice... I've been trying to implement a UISearchBar purely programatically (no xib, no interface builder). Here is my .h header: @interface RLCASearchMasterViewController :…
Piotr
  • 1,437
  • 6
  • 19
  • 24
3
votes
1 answer

UISearchBar full screen

I have uisearchbar in a uiview which is already subview of a uiviewController, I want to show the search bar in full screen when search bar is edited, i need to show the searching event in full screen, how to do this? here is my screen here i have…
Charan
  • 4,940
  • 3
  • 26
  • 43
3
votes
5 answers

Customizing search bar in iPhone application Development

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…
3
votes
1 answer

Making a search bar in Flutter

I made a search bar that looks like this here's the full code import 'package:flutter/material.dart'; class SearchInput extends StatefulWidget { @override State createState() => _SearchInputState(); } …
presudeous
  • 33
  • 1
  • 1
  • 6
3
votes
1 answer

Swift 3.0 How to dismiss keyboard on a Search Bar when clicking outside of the bar

As stated in the title, I am interested in dismissing the keyboard from a search bar when clicking outside of the search bar. Similar questions stated to used self.view.endEditing(true) in touchesBegan, but I have had no luck. I am not sure if I am…
Kevin
  • 1,189
  • 2
  • 17
  • 44
3
votes
0 answers

Has anyone successfully added a UISearchBar to Core Data Project in Swift

As part of an assignment for a iOS development class, I'm tasked with adding a UISearchBar to a Core Data project written in Swift. I can't figure out how to get the search bar to compare the text to the objects in my managedObjectContext. I know…
Adrian
  • 16,233
  • 18
  • 112
  • 180
3
votes
4 answers

Why my UISearchBar`s frame is changed by the UISearchDisplayController

I write UISearchBar in my TopBar.m like this: _tempSearchBar =[[UISearchBar alloc]initWithFrame:CGRectMake(44, 0, 320 - 44, 43)]; _tempSearchBar.barStyle=UIBarStyleDefault; _tempSearchBar.placeholder=@"搜索"; [self addSubview:_tempSearchBar]; the…
2
votes
1 answer

UISearchBar implemented with Storyboards

I am very new to iOS development, very excited though. I have built an app the uses storyboards and populates a UITableView with the contents of a plist file. I managed to get everything running great so far, but now I want to add a search bar much…
Tenthrow
  • 51
  • 8
2
votes
1 answer

How to hide/disable UISearchBars Scopebar

I am using a sample code from apple developer site as a base : http://developer.apple.com/library/ios/#samplecode/TableSearch/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007848-Intro-DontLinkElementID_2 Its a simple table Search code. What I…
Aniket
  • 131
  • 1
  • 3
  • 9
1
2
3
9 10