【问题标题】:Open Apple map with navigation bar and barbuttonitem使用导航栏和 barbuttonitem 打开 Apple 地图
【发布时间】:2013-05-24 18:11:59
【问题描述】:

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

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

- (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.
}

【问题讨论】:

    标签: ios objective-c navigation apple-maps


    【解决方案1】:

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

    【讨论】:

    • 我试过这样做,直到我发现我无法输入从一个点到另一个点的行车路线...感谢您的反馈。
    猜你喜欢
    • 2013-01-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-03-31
    • 2020-10-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多