1

I am using GMSAutocompleteResultsViewController for google autocomplete search places. When I search with this it shows very limited results.It does not show all results. Moreover when it is used in android it shows many results. Kindly let me know what I am missing.

 override func viewDidLoad() {
        super.viewDidLoad()

        resultsViewController = GMSAutocompleteResultsViewController()
        resultsViewController?.delegate = self

        searchController = UISearchController(searchResultsController: resultsViewController)
        searchController?.searchResultsUpdater = resultsViewController

        // Put the search bar in the navigation bar.
        searchController?.searchBar.sizeToFit()
        navigationItem.titleView = searchController?.searchBar

        // When UISearchController presents the results view, present it in
        // this view controller, not one further up the chain.
        definesPresentationContext = true
        // Prevent the navigation bar from being hidden when searching.
        searchController?.hidesNavigationBarDuringPresentation = false
    }
Tanvir Nayem
  • 702
  • 10
  • 25
TechChain
  • 8,404
  • 29
  • 103
  • 228

1 Answers1

1

I have found answer myself. Google API for iOS provide only 5 results for searching where as for Android it is providing more results. You can refer below link

https://developers.google.com/places/web-service/autocomplete#place_autocomplete_responses

TechChain
  • 8,404
  • 29
  • 103
  • 228