0

我有一些代码可以在我按下按钮时打开 Apple Maps,但我想以某种方式在屏幕顶部实现一个导航控制器,以便我可以返回上一页。是否有可能做到这一点,或者苹果原生应用程序有自己不可编辑的方式?

谢谢。感谢所有帮助。这是我用来打开地图的代码。

- (IBAction)mapPressed:(id)sender
{

CLLocationCoordinate2D location = CLLocationCoordinate2DMake(25.613336,-80.398437);
//Apple Maps, using the MKMapItem class
MKPlacemark *placemark = [[MKPlacemark alloc] initWithCoordinate:location addressDictionary:nil];
MKMapItem *item = [[MKMapItem alloc] initWithPlacemark:placemark];
item.name = @"Zoo Miami";
[item openInMapsWithLaunchOptions:nil];

//I need an navigation bar to open with the Apple map so that I could go back to my app without exiting the map and re-entering my app.
}
4

1 回答 1

2

不幸的是,您无法向任何其他应用程序添加操作。为此,您需要在自己的视图控制器中实现MKMapView 。

于 2013-05-24T18:24:58.267 回答