【问题标题】:How to use Autocomplete place function in iOS swift?如何在 iOS swift 中使用自动完成位置功能?
【发布时间】:2016-11-16 01:04:27
【问题描述】:

如何在 iOS 应用中实现自动完成位置功能。那就是当我尝试搜索某些东西时,它会给我关于这些地方的建议。我知道谷歌自动完成 api。但是问题在于它使应用程序的大小太大。我们必须为此导入 GoogleMaps pod 及其大约 100 MB。如何在没有谷歌地图的情况下使用自动完成地点功能?或者使尺寸小于当前谷歌地图的吊舱? 我的 podfile 的代码很简单,写在下面

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

target 'slotcaddy' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Google/SignIn'

post_install do |installer|
  installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
          config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
          config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
          config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
      end
  end
end

# Pods for slotcaddy

target 'slotcaddyTests' do
  inherit! :search_paths
  # Pods for testing
end

target 'slotcaddyUITests' do
  inherit! :search_paths
  # Pods for testing
end

end

请大家帮忙 TIA

【问题讨论】:

    标签: swift google-maps autocomplete size


    【解决方案1】:

    我在 Internet 上找到的唯一教程是使用 JavaScript,尽管您使用的是 IOS,然后将我找到的本教程作为附加信息提供给您,或者您可以从中获得一些想法。

    tutorial 使用Google Maps Places API 自动完成功能,无需显示地图。只需查看教程即可了解代码中需要的示例代码。

    查看此SO question 了解更多信息。

    【讨论】:

      猜你喜欢
      • 2014-08-11
      • 1970-01-01
      • 2014-09-20
      • 1970-01-01
      • 1970-01-01
      • 2021-06-24
      • 1970-01-01
      • 1970-01-01
      • 2014-04-20
      相关资源
      最近更新 更多