本文介绍了Google Maps iOS SDK-在SubView中添加GMSPanoramaView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将GMSPanoramaView添加到SubView.这是我正在处理的代码:
I'm trying to add a GMSPanoramaView to a SubView.Here is the code I'm working on :
panoView_ = [[GMSPanoramaView alloc] initWithFrame:CGRectZero];
panoView_.delegate = self;
self.view = panoView_;
[panoView_ moveNearCoordinate:CLLocationCoordinate2DMake(emplLatitude, emplLongitude)];
此代码在全屏模式下渲染全景图.
This code renders the panorama on fullscreen mode.
如果我尝试这样做,什么也没发生:
If I try this, nothing happens :
self.myView = panoView_;
在情节提要中设置了myView出口的地方.
Where myView outlet is set in my storyboard.
此堆栈可能是此的可能重复项,得到了答复.
This stack is a possible duplicate of this one which never got answered.
帮助表示感谢:)
推荐答案
未使用CGRectZero初始化panoView_时有效
Works when panoView_ is NOT inited with CGRectZero
panoView_ = [[GMSPanoramaView alloc] initWithFrame:CGRectMake(200, 200, 400, 400)];
self.myView.frame = panoView_.frame;
[self.myView addSubview:panoView_];
这篇关于Google Maps iOS SDK-在SubView中添加GMSPanoramaView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!