uisearchbar

Adding UISegmentedControl in UISearchDisplayController

点点圈 提交于 2019-12-23 02:38:39
问题 I want to add the UISegmentedControl below the searchBar and above the TableView of UISearchDisplayController . Currently UISearchDisplayController only shows its tableView under its SearchBar . But i want to add a UISegmentedControl below the SearchBar so that I have SearchBar on the top, after SearchBar I have a UISegmentedControl and below that UISegmentedControl I have UITableView . Is that any way to do this using UISearchDisplayController or i have to make my own SearchDisplayController

Get rid of line above UITableView

六月ゝ 毕业季﹏ 提交于 2019-12-22 18:28:57
问题 I have a UITableView (which happens to have a UISearchBar ) and can't seem to figure out how to get rid of the white/gray border above it. I need to have seamless black between the UISearchBar and the black above it. I have tried hiding the UISearchBar to see if that had anything to do with it, but the line still appeared. Any ideas? 回答1: In my case it helped to set: searchBar.clipsToBounds = YES; 回答2: You have to customise the UISearchBar background to match according to your requirements.

Hide UITableView search bar

点点圈 提交于 2019-12-22 10:34:50
问题 I have a UITableViewController with a UISearchDisplayController setup in the standard way (with the search bar inside the tableView). I'd like the search bar to start out hidden - really hidden, not merely scrolled away as in this solution. Then I'd like to present the search UI when the user presses a button, and hide it again (really hide it) after the user selects one of the items found in the search. Here's the almost working code for that: - (void)viewWillAppear:(BOOL)animated { [super

How to change height of search bar? Swift

谁都会走 提交于 2019-12-22 08:25:40
问题 I have this: http://postimg.cc/image/oepn8hhzd/ and I need this one: http://postimg.cc/image/4bacislw5/ My code of search bar var searchBar:UISearchBar = UISearchBar(frame: CGRectMake(0, 0, 200, 0)) searchBar.tintColor = UIColor.blueColor() self.searchBar.layer.borderColor = UIColor.blueColor().CGColor self.searchBar.layer.borderWidth = 0.5 self.searchBar.layer.cornerRadius = 5.0 self.searchBar.clipsToBounds = true searchBar.placeholder = "Search for cities" searchBar.sizeToFit() self

Changing tintColor of UISearchBar inside ABPeoplePickerNavigationController

爷,独闯天下 提交于 2019-12-22 08:07:26
问题 I am tyring to customize the colors a bit in a ABPeoplePickerNavigationController below is my complete code: ABPeoplePickerNavigationController *objPeoplePicker = [[ABPeoplePickerNavigationController alloc] init]; [objPeoplePicker setPeoplePickerDelegate:self]; objPeoplePicker.topViewController.navigationController.navigationBar.tintColor = [UIColor colorWithRed:0.294 green:0.278 blue:0.247 alpha:1.0]; objPeoplePicker.topViewController.searchDisplayController.searchBar.tintColor = [UIColor

Empty space below navigation bar with displaysSearchBarInNavigationBar = YES

走远了吗. 提交于 2019-12-22 08:07:20
问题 I've an issue with a search bar in a navigation bar using the property displaysSearchBarInNavigationBar = YES . I have an empty space between the navigation bar and the search content which is equals to the height of the navigation item + status bar. It's just as if during building the view, the framework doesn't know that my search bar is the navigation bar... This empty space appears before tipping anything, and when displaying the result tables. I haven't found anything related to this

Why: “Attempting to load .. while deallocating… :UISearchController:”

假装没事ソ 提交于 2019-12-22 06:58:36
问题 I have root storyboard that has a button that pushes ViewControllerB. ViewControllerB has a sort controller UISortController . ViewControllerB has a "back" method that is controlled by the root nav controller. I'm getting the following warning: Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior (<UISearchController: 0x7ff10258ba60>) I used Apple's sample (membership required) to add the new UISearchController. Has

Why: “Attempting to load .. while deallocating… :UISearchController:”

陌路散爱 提交于 2019-12-22 06:58:20
问题 I have root storyboard that has a button that pushes ViewControllerB. ViewControllerB has a sort controller UISortController . ViewControllerB has a "back" method that is controlled by the root nav controller. I'm getting the following warning: Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior (<UISearchController: 0x7ff10258ba60>) I used Apple's sample (membership required) to add the new UISearchController. Has

Is is possible to change a UISearchBar placeholder's alignment?

≡放荡痞女 提交于 2019-12-22 06:56:22
问题 I am going to need to show the UISearchBar in different alignments because of different input languages. I saw this answer, but I can't find where is it that you actually align the text to the right on a UISearchBar . Any ideas? Thanks! 回答1: This is what I've done: for (UIView *subView in self.subviews){ if ([subView isKindOfClass:[UITextField class]]) { UITextField *text = (UITextField*)subView; text.textAlignment = UITextAlignmentRight; text.rightViewMode = UITextFieldViewModeAlways; } } If

Searching a TableView of annotations

孤人 提交于 2019-12-21 23:56:05
问题 I had no idea how to set up a database when i started so i have 80 annotations that all look like this workingCoordinate.latitude = 50.795825; workingCoordinate.longitude = -1.103139; MainViewAnnotation *Levant = [[MainViewAnnotation alloc] initWithCoordinate:workingCoordinate]; [Levant setTitle:@"Levant"]; [Levant setSubtitle:@"Unit R09, Gunwharf Quays"]; [Levant setAnnotationType:MainViewAnnotationTypePortsmouth]; [mapView addAnnotation:Levant]; They are grouped into 22 cities through the