diff --git a/ChattoAdditions/Source/Chat Items/TextMessages/TextMessagePresenter.swift b/ChattoAdditions/Source/Chat Items/TextMessages/TextMessagePresenter.swift index bd7e7b7..9fc5f98 100644 --- a/ChattoAdditions/Source/Chat Items/TextMessages/TextMessagePresenter.swift +++ b/ChattoAdditions/Source/Chat Items/TextMessages/TextMessagePresenter.swift @@ -110,11 +110,21 @@ public class TextMessagePresenter Bool { - return action == #selector(NSObject.copy(_:)) + #if swift(>=2.3) + let selector = #selector(UIResponderStandardEditActions.copy(_:)) + #else + let selector = #selector(NSObject.copy(_:)) + #endif + return action == selector } - + public override func performMenuControllerAction(action: Selector) { - if action == #selector(NSObject.copy(_:)) { + #if swift(>=2.3) + let selector = #selector(UIResponderStandardEditActions.copy(_:)) + #else + let selector = #selector(NSObject.copy(_:)) + #endif + if action == selector { UIPasteboard.generalPasteboard().string = self.messageViewModel.text } else { assert(false, "Unexpected action")