uisearchcontroller

Strange issue, space of my UISearchController

点点圈 提交于 2019-12-08 05:24:45
问题 The issue is like this: There has space between searchbar and navbar : And in the Debug in Hierarchy : The table View The wrapper View, we can see the space (20 pix) And in the storyboard , I set the constraint to the tableView , attention: the navigationBar is draged by myself, the native is hide by me. My Code import UIKit import SVProgressHUD class StoreListViewController: UIViewController, UISearchBarDelegate, UITableViewDelegate,UITableViewDataSource, UISearchResultsUpdating { @IBOutlet

search bar getting disappeared in ios UIsearchcontroller

一世执手 提交于 2019-12-08 04:26:02
问题 I am using UISearchController and when I click on the searchbar , I get animation as if the searchbar is going to the navigation bar of the presented searchcontroller with fading animation but it disappears and the keyboard presented is staying there. In viewcontroller.m, viewdidload method, relevant part: UIView *searchView = [[UIView alloc]initWithFrame:CGRectZero]; searchResultsViewController =[[SearchResultsViewController alloc]initWithNibName:@"SearchResultsViewController" bundle:nil];

Position UISearchBar programmatically using UISearchController

荒凉一梦 提交于 2019-12-08 03:17:19
问题 I'm attempting to position my UISearchBar directly under my UINavigationBar but I'm having issues where it's not appearing at all. I'm using iOS8's new searchController. self.searchController = [[UISearchController alloc] initWithSearchResultsController:searchResultsController]; self.searchController.searchResultsUpdater = self; self.searchController.searchBar.frame = CGRectMake(self.searchController.searchBar.frame.origin.x, self.searchController.searchBar.frame.origin.y, self

UISearchController doesn't move my UITableView up

送分小仙女□ 提交于 2019-12-08 02:56:18
问题 As you can see, my UITableView 's scroll is maximum down, but my table is not fully visible. Why? I use UITableViewController 回答1: Good alternative to Ortwin's answer is to use keyboardDismissMode property of UIScrollView : tableView.keyboardDismissMode = .OnDrag Swift 4.1 tableView.keyboardDismissMode = .onDrag 回答2: I recommend to simply hide the keyboard as soon as the user starts scrolling. Apple implements this behavior in their own apps. To do that, add in your table view controller: -

UISearchController with loading indicator

百般思念 提交于 2019-12-07 16:23:42
问题 I implemented UISearchController and I'm getting the data from a js callback but when I tape in the searchbar it takes some time to put the data so I wanted to know how to implement a loading indicator into the table view result of UISearchController 回答1: When you start searching at that time you can create an activity indicator and add it as the subview of UISearchBar using addSubView method. UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle

Search Bar disappears after tap on it

五迷三道 提交于 2019-12-07 10:56:04
问题 Am trying to implement search nearby places using google maps. The below is the code what I have done so far override func viewDidLoad() { super.viewDidLoad() //Adding Mapview mapView = GMSMapView(frame: CGRectMake(0, 120, self.view.bounds.width, self.view.bounds.height - 120)) self.view.addSubview(mapView) mapView.mapType = kGMSTypeNormal locationManager.delegate = self locationManager.requestWhenInUseAuthorization() let resultTableView = UITableView(frame: CGRectMake(10, 100, 300, 60)) self

UISearchBar gets cut off when using a UINavigationController inside a UITabBarController

巧了我就是萌 提交于 2019-12-07 05:38:56
问题 I am trying to implement a search bar within one of the tabs in my UITabBarController, the tab is a UITableViewController within a UINavigationController...I am following an Apple tutorial - I have tried a lot of different options including answers mention here Search bar gets cut off when using UISearchController with a UITabBarController inside a UINavigationController I have tried setting the following property using self.definesPresentationContext = true or self.tabBarController?

Navigating to a view (push) from a search results table (UISearchController) and keeping the search results in place

流过昼夜 提交于 2019-12-07 05:06:16
问题 I have a search results table ( UISearchController ) that is presented on a view that exists on a navigation stack. I present the search controller and table on my view like this: _searchResultsTableViewController = [[CalendarSearchResultsTableViewController alloc] init]; _searchResultsTableViewController.delegate = self; _searchController = [[UISearchController alloc] initWithSearchResultsController:_searchResultsTableViewController]; _searchController.delegate = self; _searchController

iOS8 Swift UISearchController hides navigationbar

陌路散爱 提交于 2019-12-07 02:48:40
问题 I implemented a search function for an UITableViewController like this: self.resultSearchController = ({ let controller = UISearchController(searchResultsController: nil) controller.searchResultsUpdater = self controller.dimsBackgroundDuringPresentation = false controller.searchBar.sizeToFit() self.tableView.tableHeaderView = controller.searchBar return controller })() The problem I've been experiencing is that if I click on it, my navigation bar and my navigationcontrollers header disappear.

search bar getting disappeared in ios UIsearchcontroller

时间秒杀一切 提交于 2019-12-06 22:27:28
I am using UISearchController and when I click on the searchbar , I get animation as if the searchbar is going to the navigation bar of the presented searchcontroller with fading animation but it disappears and the keyboard presented is staying there. In viewcontroller.m, viewdidload method, relevant part: UIView *searchView = [[UIView alloc]initWithFrame:CGRectZero]; searchResultsViewController =[[SearchResultsViewController alloc]initWithNibName:@"SearchResultsViewController" bundle:nil]; self.searchController =[[UISearchController alloc]initWithSearchResultsController:nil]; self