我下载Google Maps SDK for iOS以及api密钥
我导入所有框架以及GoogleMaps.framework和GoogleMaps.bundle。 在我的视图控制器中我写。
static CLLocationCoordinate2D kPanoramaNear = {-33.874437, 151.207459};
- (void)loadView
{
CGRect applicationFrame = [[UIScreen mainScreen] bounds];
panoView_ = [[GMSPanoramaView alloc] initWithFrame:CGRectZero];
panoView_ = [GMSPanoramaView panoramaWithFrame:applicationFrame nearCoordinate:kPanoramaNear];
panoView_.backgroundColor = [UIColor grayColor];
panoView_.delegate = self;
panoView_.navigationLinksHidden = YES;
panoView_.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
self.view = panoView_;
[panoView_ moveNearCoordinate:CLLocationCoordinate2DMake(-33.732, 150.312)];
}
但我的程序崩溃了
由于未捕获的异常终止应用' NSInvalidArgumentException',原因:' + [NSData gtm_dataByInflatingData:]:无法识别的选择器发送到类0xe79238'
答案 0 :(得分:0)