Cam*_*est 6 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];
Run Code Online (Sandbox Code Playgroud)
我的iPhone 5S上的导航语音音量设置为正常,我已重新启动手机.语音转换指示在所有其他时间都可以正常工作,而不是来自我的应用程序.
| 归档时间: |
|
| 查看次数: |
765 次 |
| 最近记录: |