// // + MessageLabelDelegate.swift // Wallet // // Created by Saveliy Stavitsky on 2/9/21. // Copyright © 2021 AM. All rights reserved. // import MessageKit import Foundation import UIKit extension CryptoChatControllerChat: MessageLabelDelegate { func didSelectAddress(_ addressComponents: [String: String]) { print("Address Selected: \(addressComponents)") if let url = URL(string: "http://maps.apple.com/?address=\(addressComponents.values.joined(separator: ","))") { UIApplication.shared.open(url) } } func didSelectDate(_ date: Date) { print("Date Selected: \(date)") } func didSelectPhoneNumber(_ phoneNumber: String) { print("Phone Number Selected: \(phoneNumber)") if let url = URL(string: "tel://\(phoneNumber)") { UIApplication.shared.open(url) } } func didSelectURL(_ url: URL) { print("URL Selected: \(url)") UIApplication.shared.open(url) } func didSelectTransitInformation(_ transitInformation: [String: String]) { print("TransitInformation Selected: \(transitInformation)") } func didSelectHashtag(_ hashtag: String) { print("Hashtag selected: \(hashtag)") } func didSelectMention(_ mention: String) { print("Mention selected: \(mention)") } func didSelectCustom(_ pattern: String, match: String?) { print("Custom data detector patter selected: \(pattern)") } }