iOS 7 MKMapView缺少语音转弯方向

时间:2013-11-01 14:04:02

标签: objective-c apple-maps

我在调用苹果地图方向时没有获得语音指示。

这是我的代码。

    CLLocationCoordinate2D userCoord = [self.userLocation coordinate];
    CLLocationCoordinate2D opponentCoord = [self.opponentLocation coordinate];
    MKPlacemark *fromPlace = [[MKPlacemark alloc] initWithCoordinate:userCoord addressDictionary:nil];
    MKPlacemark *destinationPlace = [[MKPlacemark alloc] initWithCoordinate:opponentCoord addressDictionary:nil];
    MKMapItem *fromItem = [[MKMapItem alloc] initWithPlacemark:fromPlace];
    fromItem.name = @"Current Location";
    MKMapItem *destinationItem = [[MKMapItem alloc] initWithPlacemark:destinationPlace];
    destinationItem.name = self.game[@"opponent"];
    NSArray *items = @[fromItem, destinationItem];
    NSDictionary *options = @{MKLaunchOptionsDirectionsModeKey:MKLaunchOptionsDirectionsModeDriving, MKLaunchOptionsMapTypeKey:@(MKMapTypeStandard), MKLaunchOptionsShowsTrafficKey:@YES};
    [MKMapItem openMapsWithItems:items launchOptions:options];

我的iPhone 5S上的导航语音音量设置为正常,我已重新启动手机。语音转换指示在所有其他时间都可以正常工作,而不是来自我的应用程序。

0 个答案:

没有答案