uisearchdisplaycontroller

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

柔情痞子 提交于 2019-11-28 21:33:17
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 and the tab bar. This means that the very last search result is obscured by the banner. How do I specify the size of the table view used by UISearchDisplayController? There's no bounds or frame property that I can see. EDIT TO ADD SCREENSHOTS: This is how the table view is set up in IB. It ends 50px short of the synthesized tab bar. (source:

UISearchDisplayController causes crash after viewDidUnload

瘦欲@ 提交于 2019-11-28 20:38:30
I have a project using StoryBoards and UISearchDisplayController used in the context of a UINavigationController , that appears in the root viewcontroller. When I push a new view controller onto the stack and I cause a simulated memory warning (or actually get a low memory warning). The previous view controller successfully unloads its view. However, when I pop the second view controller off of the stack I get an EXC_BAD_ACCESS . I turned on NSZombies and discovered this: [UISearchDisplayController retain]: message sent to deallocated instance 0xb13aa30 I am not (at least in my code) sending

UIViewController does not retain its programmatically-created UISearchDisplayController

試著忘記壹切 提交于 2019-11-28 16:46:37
问题 In the UIViewController documentation about the searchDisplayController property 1 it says: If you create your search display controller programmatically, this property is set automatically by the search display controller when it is initialized. And when I create my UISearchDisplayController thusly: [[[UISearchDisplayController alloc] initWithSearchBar:searchBar contentsController:self] autorelease]; -[UIViewController searchDisplayController] is not nil . However, it is nilled out after the

How to change background color of UISearchBar in iOS7

為{幸葍}努か 提交于 2019-11-28 16:17:56
How to change background color of UISearchBar in iOS7? not gray, I want to change color like my uinavigationbar if I Use this code, that's what comes out searchBar.backgroundColor = [UIColor redColor]; That is not red color!!! This exact same situation as in background color of navigation bar. Need to use: searchBar.barTintColor = [UIColor redColor]; All thanks! Set the background image to a clear image and you're good to go. This is also pre-ios 7 compatible. searchBar.backgroundImage = [[UIImage alloc] init] searchBar.backgroundColor = [UIColor redColor]; If the above solutions don't seem

Cursor invisible in UISearchBar iOS 7

南笙酒味 提交于 2019-11-28 13:20:03
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 that; As you can see, there is no cursor, I can start typing and search, everything works fine. Also it's invisible only in iOS 7. However, with iOS 6.1 and iOS 7.1 Beta 3 I could see the cursor. So how can I make UISearchBar cursor visible or how can I add cursor in my UISearchBar? Cursor in the search bar takes color from Search Bar -> View -> Tint

How to keep scopebar even after pressed Cancel button?

拟墨画扇 提交于 2019-11-28 12:46:12
I have a UITableView with a searchbar on the top. I used UISearchDisplayController for implementing the same. And also it has a scope bar with two buttons. In default when I launch the app, the scope bar will be displayed. When I click the cancel button after the searching, the scopebar disappeared. So is there any way to keep the scopebar even after I pressed the Cancel button. I used the following code but its not working. - (BOOL)searchBarShouldEndEditing:(UISearchBar *)searchBar { [searchBar setShowsScopeBar:YES]; return YES; } Thanks :) I've had the problem today and I think I've found a

iOS - using UISearchDisplayController with UISearchBar that is UIBarButtonItem in UIToolbar

ぃ、小莉子 提交于 2019-11-28 10:22:06
Has anyone tried using a UISearchDisplayController with a UISearchBar that is a UIBarButtonItem in a UIToolbar? I would appreciate tips on how to do this successfully. Currently whenever the search controller pops up it redraws the UISearchBar and I'm struggling to maintain a similar look to the UIToolbar Usually you don't want to put a search bar inside a toolbar, however, it seems you want to do something similar to what I did. So here is how I did it, it may be called a hack, but it works like a charm :) First you have to set it up in interface builder like this: Notice that the search is

UISearchDisplayContoller – can't prevent table reload on typing in search bar

谁都会走 提交于 2019-11-28 07:48:25
I'm trying to set up a search display controller to handle async results from a web service. I've got the basic bits in place but have run into a really strange issue that I can't figure out. Seems like to rig up the search display controller for async you really just need to do two things: return NO for searchDisplayController:shouldReloadTableForSearchString, and handle searchBarSearchButtonClicked and fire off the table reload myself. I'm doing both of these but what I'm seeing is that the search display controller is reloading the table on the first character typed into the search bar even

ios 5 UISearchDisplayController crash

孤街浪徒 提交于 2019-11-28 06:50:06
I am implementing a UITableView with UISearchDisplayController in xcode 4.2. UITableView & UISearchDisplayController are created in StoryBoard. I set the Cell Identifier (SampleCell) for UITableView and access it like cell = [tableView dequeueReusableCellWithIdentifier:@"SampleCell"]; UItableView is working fine. But once i try to search, the app crash with below error. *** Assertion failure in -[UISearchResultsTableView _createPreparedCellForGlobalRow:withIndexPath:], /SourceCache/UIKit_Sim/UIKit-1912.3/UITableView.m:6072 2011-11-09 22:22:16.058 SampleApp[14362:fb03] *** Terminating app due

MonoTouch SIGSEGV crash using navigationcontroller and searchdisplaycontroller

扶醉桌前 提交于 2019-11-28 06:13:57
问题 In the MonoTouch simulator I am getting random crashes with the following diagnostic: /tmp/mono-gdb-commands.FV1b8V:1: Error in sourced command file: unable to debug self Got a SIGSEGV while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. The trace mentions "UISearchDisplayController dealloc" : at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging.void_objc_msgSend (intptr,intptr) <IL 0x00024,