1
0
mirror of https://github.com/metabolist/metatext synced 2024-12-29 03:01:07 +01:00

Add copy text VoiceOver action

This commit is contained in:
Justin Mazzocchi 2021-02-03 13:10:12 -08:00
parent 328c38f27f
commit 533a1d1830
No known key found for this signature in database
GPG Key ID: E223E6937AAFB01C
2 changed files with 10 additions and 0 deletions

View File

@ -3,6 +3,7 @@
"about" = "About";
"about.acknowledgments" = "Acknowledgments";
"accessibility.activate-link-%@" = "Activate link: %@";
"accessibility.copy-text" = "Copy text";
"account.%@-followers" = "%@'s Followers";
"account.accept-follow-request-button.accessibility-label" = "Accept follow request";
"account.avatar.accessibility-label-%@" = "Avatar: %@";

View File

@ -755,6 +755,15 @@ private extension StatusView {
return true
})
actions.append(
UIAccessibilityCustomAction(
name: NSLocalizedString("accessibility.copy-text",
comment: "")) { [weak self] _ in
UIPasteboard.general.string = self?.bodyView.contentTextView.text
return true
})
actions.append(contentsOf: bodyView.accessibilityCustomActions ?? [])
if menuButton.isEnabled {