1

我已经有 yandex 的 API 密钥。我已经从https://github.com/yandexmobile/yandexmapkit-ios下载并运行了该项目。我在我的项目中创建了 Settings.h/Settings.m 文件并使用此代码来显示 mapView。

[[Settings sharedSettings] setApiKey: @"My API Key"];
self.mapView = [YMKMapView new];
[self.mapView setFrame: self.view.frame];
[self.mapView setTracksUserLocation: YES];
[self.mapView setShowsUserLocation: YES];
[self.mapView setShowTraffic: NO];
[self.view addSubview: self.mapView];

但似乎 setApiKey 不起作用。有什么建议么?

4

0 回答 0