1
UIActivityViewController에서 자신의 위치와 관련된 (위도, 경도)를 공유하려고합니다. 사용자가 다른 사람과 SMS의 위치를 공유 할 수 있으며 클릭 가능한 작은지도.UIActivityViewController를 사용하여 경도와 위도를 공유하는 방법
주소를 텍스트로 공유하는 방법을 알고 있습니다. 여기
@IBAction func didTapShareLocation(_ sender: UIButton) {
guard let carAddress = self.adressLabel.text else {
return
}
let textToShare = "My car is at this address: \(carAddress)"
let objectsToShare = [textToShare] as [Any]
let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil)
activityVC.popoverPresentationController?.sourceView = sender
myParentVC?.present(activityVC, animated: true, completion: nil)
}
다음 [검색 결과] (http://stackoverflow.com/search?q=UIActivityViewController+location)를 읽어 보시기 바랍니다. – rmaddy