Search Results

Search found 39 results on 2 pages for 'uisearchdisplaycontroller'.

Page 2/2 | < Previous Page | 1 2 

  • Disable animations when ending search in iPhone

    - by camilo
    Hi. A quicky: is there a way to dismiss the keyboard and the searchDisplayController without animation? I was able to do it when the user presses "Cancel", but when the user presses the black "window thingy" above search field (only visible while the user hasn't inserted any text), the animation always occurs, even when I change the delegate functions. Is there a way to control this, or as an alternative, to disable the user to end searching by pressing the black window? Thanks in advance.

    Read the article

  • Problem when exiting search in iPhone

    - by camilo
    Hi. I have a search display controller, and it is searching well. I'm searching in a table with several sections and I have a viewForHeaderInSection function working as it's supposed to. When I start searching, my numberOfSectionsForTableView returns 1, and I have a special view saying "Search Results" wich I use in self.searchDisplayController.searchResultsTableView. The problem happens when I select a row in my searchResultsTableView: I change the view, and when I return and try to exit the searchDisplayController (by pressing the CancelButton), the tables change nice, but changing the viewforHeader for my first section is not "pretty". I have a "kind-of-click" anymation. I would like it to not be so noticeable for the user, having a more "fluid" change. Anybody had the same problem and knows how to solve it? In a different question (which would work as a workaround): how can I hide the keyboard while searching without pressing the Cancel or Search buttons? Thanks a lot!

    Read the article

  • UISearchBarDisplayController - Fixed SearchBar

    - by slik
    I've been trying to get UISearchBarDisplayController to not animate, and stay fixed below the navigation bar. Is this even possible, I've been getting some weird results. This is all configured through a storyboard. I am just trying to figure out If I should just create my own implementation of UISearchBarDisplayController since it kinda seems a little impossible to customize it to my need. Clicking the search box When I start searching the top has extra paddding (20pt). It's assuming its on top of the origin y: 0 to prevent overlapping of status bar. I can't click outside or the cancel, x buttons. What happens If I click cancel, before searching

    Read the article

  • How can UISearchDisplayController autorelease cause crash in a different view controller?

    - by Tofrizer
    Hi, I have two view controllers A and B. From A, I navigate to view controller B as follows: // in View Controller A // navigateToB method -(void) navigateToB { BViewController *bViewController = [[BViewController alloc] initWithNibName: @"BView" bundle:nil]; bViewController.bProperty1 = SOME_STRING_CONSTANT; bViewController.title = @"A TITLE OF A VC's CHOOSING"; [self.navigationController pushViewController: bViewController animated:YES]; [bViewController release]; //<----- releasing 0x406c1e0 } In BViewController, the property bPropery1 is defined with copy as below (note, B also contains UITableView and other properties): @property (nonatomic, copy) NSString *bProperty1; Everything appeared to work fine when navigating back and forth between A and B. That is until I added a UISearchDisplayController to the table view contained in BViewController. Now when I navigate out of B, back to A, the app crashes. Stack trace shows what looks the search display controller being autoreleased at time of crash: #0 0x009663a7 in ___forwarding___ #1 0x009426c2 in __forwarding_prep_0___ #2 0x018c8539 in -[UISearchDisplayController _destroyManagedTableView] #3 0x018c8ea4 in -[UISearchDisplayController dealloc] #4 0x00285ce5 in NSPopAutoreleasePool NSZombies shows: -[BViewController respondsToSelector:]: message sent to deallocated instance 0x406c1e0 And malloc history on this points to the bViewController already released in A's navigateToB method above: Call [2] [arg=132]: thread_a065e720 |start ... <snip> ..._sendActionsForEvents:withEvent:] | -[UIControl sendAction:to:forEvent:] | - [UIApplication sendAction:to:from:forEvent:] | -[**AViewController navigateToB**] | +[NSObject alloc] | +[NSObject allocWithZone:] | _internal_class_createInstance | _internal_class_createInstanceFromZone | calloc | malloc_zone_calloc Can someone please give me any ideas on what is happening here? In navigateToB method, once the bViewController is released (after pushViewController), that's should be it for bViewController. Nothing else even knows about it as it is local to the navigateToB method block and it has been released. When navigating from B back to A, nothing is invoked in viewDidLoad, viewWillAppear etc that will re-enter navigateToB. It looks like somehow search display controller has a reference to something in my AViewController and so as it is autoreleased it is taking this "something" down with it but I cannot understand how this is possible, especially as I'm using copy to pass data between A and B. I'm going potty over this. I'm sure this is my mistake somewhere and so I turn to you, Stack Overflow legends for any words of wisdom or advice on how to resolve this. Many Thanks.

    Read the article

  • How to add a custom background to UISearchDisplayController's table view?

    - by Boon
    I want to add a custom UIImageView to UISearchDisplayController's table view background and set table view's background color to clearColor. Tried a few different approach but couldn't find the right solution. Any idea how to approach this? Note: I don't want to add to searchDisplayController's searchResultsTableView's view hierarchy, but rather overlay another sibling view below it)

    Read the article

  • How can I retain the editing in the search result with UISearchDisplayController?

    - by wal
    I want to search a table in editing mode, but when I type a letter the variable tableView.editing is changed to NO. And when I cancel the search, the tableView.editing return to YES. I'd like to retain the editing YES in the result of the search. I put breakpoint in several methods. Until the filterContentForSearchText method, the variable is YES, but in the cellForRowAtIndexPath, it is NO. Image of the table in editing mode just before type a letter in the search bar. Image of the search Image of the table after the searching (editing mode again)

    Read the article

  • How can I retain the editing in the tableView of the search result with UISearchDisplayController?

    - by wal
    I want to search a table in editing mode, but when I type a letter the variable tableView.editing is changed to NO. And when I cancel the search, the tableView.editing return to YES. I'd like to retain the editing YES in the result of the search. I put breakpoint in several methods. Until the filterContentForSearchText method, the variable is YES, but in the cellForRowAtIndexPath, it is NO. Image of the table in editing mode just before type a letter in the search bar. Image of the search Image of the table after the searching (editing mode again)

    Read the article

  • setSearchDisplayController considered private-API?

    - by Adun
    Hi, I recently submitted an app for app review but I got rejected because of the use of a private API. I'm still a bit new to iPhone developing so I was wondering if someone could help me understand how this part was rejected: UISearchBar *searchBar = [[[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 0)] autorelease]; searchBar.showsCancelButton = NO; searchBar.placeholder = @"Search Exhibitors"; [searchBar sizeToFit]; [self.tableView setTableHeaderView:searchBar]; UISearchDisplayController *searchDisplayController = [[UISearchDisplayController alloc] initWithSearchBar:searchBar contentsController:self]; [self performSelector:@selector(setSearchDisplayController:) withObject:searchDisplayController]; [searchDisplayController setDelegate:self]; [searchDisplayController setSearchResultsDataSource:self]; [searchDisplayController setSearchResultsDelegate:self]; [searchDisplayController release]; The part that they mentioned was the "setSearchDisplayController". I based the searching of a UITableView on the example given here. So can anyone explain why this is considered a private API?

    Read the article

  • Flash of a Bullet in the top left corner of the search results

    - by joneswah
    I am using a UISearchDisplayController and SearchBar initialised from a nib. when the search is being run I get a flash of a small circle what looks like a "bullet" in the top left corner of the search results. [See attached screenshot] It occurs in the simulator and on the device sporadically I have looked through my nib and I am not adding any stray views and was wondering if anyone else had this issue or knows how to get rid of it? thanks @interface SearchTabViewController : UITableViewController

    Read the article

  • NSPredicate Search Keyboard Lag

    - by user3306356
    I'm experiencing some keyboard lag on my NSPredicate search: some code: - (void)filterContentForSearchText:(NSString*)searchText scope:(NSString*)scope { NSPredicate *resultPredicate = [NSPredicate predicateWithFormat:@"(head beginswith[c] %@) OR (pro beginswith[c] %@) OR (searchableStringValue beginswith[c] %@)", searchText, searchText, searchText]; searchResults = [chengduhua filteredArrayUsingPredicate:resultPredicate]; } &&&& -(BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString { [self filterContentForSearchText:searchString scope:[[self.searchDisplayController.searchBar scopeButtonTitles] objectAtIndex:[self.searchDisplayController.searchBar selectedScopeButtonIndex]]]; return YES; }

    Read the article

  • iphone - Search bar disappears from my root view controller

    - by Sudharsanan
    Hi, I have a search bar in my main screen - root table view controller. If I browse other screens and come back, sometimes, the search bar disappears. Here's my code. searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 0)]; searchBar.delegate = self; searchBar.tintColor = [UIColor blackColor]; [searchBar sizeToFit]; self.tableView.tableHeaderView = searchBar; searchDisplayController = [[UISearchDisplayController alloc] initWithSearchBar:searchBar contentsController:self]; searchDisplayController.delegate = self; searchDisplayController.searchResultsDataSource = self; searchDisplayController.searchResultsDelegate = self; Is there anything wrong with my code or is it one of the quirks of SDK 3.0?

    Read the article

  • UITableViewIndex Grows to Incorrect Bounds Unexpectedly

    - by chadburggraf
    I have a standard UITableView + UISearchDisplayController + UITableViewIndex setup. Everything works like a champ. Except, under very specific conditions, the index grows too long to display on the screen. Specifically, after ending a search and re-displaying the unfiltered, indexed table, the index sometimes grows too long. More specifically, this doesn't happen if I search then cancel. It only happens if I search, then push a view controller from the search table, then pop that view controller back to the still-searching table, then cancel the search, then re-search and then cancel that final search. After the end of the final search the index is too long. In portrait, the table view is reporting a height of 416 and the index a height of 404 under normal conditions. If I log from searchDisplayControllerDidEndSearch when the index is sized incorrectly, it is reporting a height of 620. I've tried everything from setLayout on the table and the index to manually re-sizing the frame. Nothing works (the manual re-size causes the correct height to be logged, but it doesn't change the display on screen). I was about to try re-sizing after a delay in case the cancel animation was interfering, but then I realized what an absurd situation I'm in and thought seeking help might be wise...

    Read the article

  • Searching with a UISearchbar is slow and blocking the main thread.

    - by Robert
    I have a Table with over 3000 entries and searching is very slow. At the moment I am doing just like in the 'TableSearch' example code (but without scopes) - (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString { [self filterContentForSearchText: searchString]; // Return YES to cause the search result table view to be reloaded. return YES; } And the filterContentForSearchText method is as follows: - (void) filterContentForSearchText:(NSString*)searchText { // Update the filtered array based on the search text // First clear the filtered array. [filteredListContent removeAllObjects]; // Search the main list whose name matches searchText // add items that match to the filtered array. if (fetchedResultsController.fetchedObjects) { for (id object in fetchedResultsController.fetchedObjects) { NSString* searchTarget = [tableTypeDelegate getStringForSearchFilteringFromObject:object]; if ([searchTarget rangeOfString:searchText options:(NSCaseInsensitiveSearch|NSDiacriticInsensitiveSearch)].location != NSNotFound) { [filteredListContent addObject:object]; } } } } My question is twofold: How do can I make the searching process faster? How can I stop the search from blocking the main thread? i.e. stop it preventing the user from typing more characters. For the second part, I tried "performSelector:withObject:afterDelay:" and "cancelPreviousPerformRequests..." without much success. I suspect that I will need to use threading instead, but I do not have much experience with it.

    Read the article

< Previous Page | 1 2