【发布时间】:2013-08-28 15:14:23
【问题描述】:
我的应用程序在 iOS6 上使用类似于以下内容的方式启动地图应用程序:
MKPlacemark* place = [[MKPlacemark alloc] initWithCoordinate: latlong addressDictionary: nil];
MKMapItem* destination = [[MKMapItem alloc] initWithPlacemark: place];
destination.name = @"Name Here!";
NSArray* items = [[NSArray alloc] initWithObjects: destination, nil];
NSDictionary* options = [[NSDictionary alloc] initWithObjectsAndKeys:
MKLaunchOptionsDirectionsModeDriving,
MKLaunchOptionsDirectionsModeKey, nil];
[MKMapItem openMapsWithItems: items launchOptions: options];
一旦我在地图应用程序中,是否有添加按钮或以其他方式返回我的应用程序?我想返回我的应用,而不是点击 iPhone 主页按钮并再次单击我的应用图标。
谢谢!
【问题讨论】:
标签: ios objective-c cocoa-touch mapkit