iOS Google Maps API - View 不会快速覆盖 map

标签 ios swift xcode google-maps

我想在 map 下方添加另一个 View ,但该 View 在运行时消失了。

在运行时 typeView 因 googlemap 而消失

enter image description here

编辑

at run time

enter image description here

type view

最佳答案

创建 Storyboard连接 View ,

@IBOutlet weak var mapView: GMSMapView!
@IBOutlet weak var typeView: UIView!

现在,您可以通过两种方式解决问题,

一种方式:

self.mapView.sendSubview(toBack: self.typeView)

第二种方式:

self.view.bringSubview(toFront: self.typeView)

关于iOS Google Maps API - View 不会快速覆盖 map ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43995898/

相关文章:

iphone - 在 Objective-C 中选择一个随机枚举

swift - 如何在 Swift 中引用来自不同类的另一个变量

ios - 如何在没有滚动效果的情况下显示最后一个 tableView 单元格

ios - 本地开发如何下载Podspec依赖

ios - 你如何在 Xcode 中为按钮设置选定的图像?

swift - Xcode 图标在自动完成期间表示什么?

iphone - 显示别名游戏中心回合制游戏

ios - 如何比较 Objective-c 中的各种 NSArray?

ios - iOS中Swift如何使用CGColorCreate变白

ios - 如何实现 react-native-maps