迅速.如何在 GMSPanoramaView 之上添加 UIView



我有一个简单的GMSPanoramaView,我想在它上面添加一个 UIView,我已经尝试了 addSubview 并更改图层 zposition,但我没有出现。关于我该怎么做的任何想法?

我实现GMSPanoramaView的方式:

let panoView = GMSPanoramaView(frame: CGRectZero)
self.view = panoView
panoView.moveNearCoordinate(CLLocationCoordinate2DMake(latitude, longitude))

试试这个:

方法1:

var yourView = UIView()
self.view.bringSubviewToFront(yourView)

方法2:

var gmsView = GMSPanoramaView()
self.view.addSubview(gmsView)
var anotherView = UIView()
self.view.insertSubview(anotherView, aboveSubview: gmsView)

这应该有效!!

最新更新