如何从swift中将应用程序发送到其他应用程序?
答
创建一个ActionSheet,就像您在图像中添加的一样。
而列表中的类似的GoogleMaps,Google地图,Waze的 所有的应用程序做点击以下..
BOOL canHandle = [[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"comgooglemaps:"]];
if (canHandle) {
UIApplication.shared.openURL(URL(string:
"comgooglemaps://?center=\(self.location.coordinate.latitude),\(self.location.coordinate.longitude)&zoom=14&views=traffic&q=\(self.location.coordinate.latitude),\(self.location.coordinate.longitude)")!
} else {
//show alert to install googlemaps
}
试试这个:https://stackoverflow.com/a/42971577/5447966 –
这不是我想要的。我想要像我添加的照片。 – SinaSB