我使用此代碼在iOS6的創建駕駛模式方向:麻煩駁回MapKit iOS6的
Class itemClass = [MKMapItem class];
if (itemClass && [itemClass respondsToSelector:@selector(openMapsWithItems:launchOptions:)]) {
MKMapItem *currentLocationItem = [MKMapItem mapItemForCurrentLocation];
NSString *Latitude = [[_locationString componentsSeparatedByString:@","] objectAtIndex:0];
NSString *Longitude = [[_locationString componentsSeparatedByString:@","] objectAtIndex:1];
MKPlacemark *place = [[MKPlacemark alloc] initWithCoordinate:CLLocationCoordinate2DMake([Latitude doubleValue], [Longitude doubleValue]) addressDictionary:nil];
MKMapItem *destinamtionLocItem = [[MKMapItem alloc] initWithPlacemark:place];
destinamtionLocItem.name = _titleString;
NSArray *mapItemsArray = @[currentLocationItem, destinamtionLocItem];
NSDictionary *dictForDirections = @{MKLaunchOptionsDirectionsModeKey: MKLaunchOptionsDirectionsModeDriving};
[MKMapItem openMapsWithItems:mapItemsArray launchOptions:dictForDirections];
}
的問題是,的導航欄總是隱藏任何按鈕關閉該視圖返回到您的應用程序。那麼,如何解散MapKit drivingMode?