gpt4 book ai didi

iphone - 将用户位置坐标作为 googleMaps 链接发送到 SMS.app

转载 作者:行者123 更新时间:2023-12-03 20:56:45 24 4
gpt4 key购买 nike

我想将我的位置坐标作为 Google map 链接 (http://maps.google.com/?saddr=%1.6f,%1.6f) 作为短信发送,但我无法让它工作。 .. 我应该如何做才能使 GoogleMaps 链接根据我的位置而变化?

MFMessageComposeViewController *controller = [[[MFMessageComposeViewController alloc] init] autorelease];

controller.body = @"This is my location http://maps.google.com/?saddr=%1.6f,%1.6f";

NSString *googleMaps = [NSString stringWithFormat:@"http://maps.google.com/?saddr=%1.6f,%1.6f", location.latitude, location.longitude];

controller.recipients = [NSArray arrayWithObjects:nil];
controller.messageComposeDelegate = self;
[self presentModalViewController:controller animated:YES];
}
}

有什么想法吗?非常感谢您的回答!!!!

谢谢您,节日快乐!

最佳答案

你不应该:

controller.body = [NSString stringWithFormat:@"http://maps.google.com/?saddr=%1.6f,%1.6f", location.latitude, location.longitude];

您对正文进行硬编码,然后创建一个不相关的字符串,该字符串可能格式正确,但从未对其执行任何操作。

关于iphone - 将用户位置坐标作为 googleMaps 链接发送到 SMS.app,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4522060/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com