소스 검색

set accessibilityViewModal for AudioRecorderController, wakeup voiceOver after returning

cyberta 3 년 전
부모
커밋
955aafc9c8
2개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      deltachat-ios/Chat/ChatViewController.swift
  2. 1 0
      deltachat-ios/Controller/AudioRecorderController.swift

+ 1 - 0
deltachat-ios/Chat/ChatViewController.swift

@@ -1923,6 +1923,7 @@ extension ChatViewController: MediaPickerDelegate {
 
     func onVoiceMessageRecorderClosed() {
         if UIAccessibility.isVoiceOverRunning {
+            UIAccessibility.post(notification: .announcement, argument: nil)
             // we need to wait a little bit, otherwise the  UIAccessibility notification is ignored and
             // the first accessibility element on the screen gets selected
             DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { [weak self] in

+ 1 - 0
deltachat-ios/Controller/AudioRecorderController.swift

@@ -106,6 +106,7 @@ class AudioRecorderController: UIViewController, AVAudioRecorderDelegate {
     
     override func viewDidLoad() {
         super.viewDidLoad()
+        self.accessibilityViewIsModal = true
         self.view.backgroundColor = UIColor.themeColor(light: .white, dark: .black)
         self.navigationController?.isToolbarHidden = false
         self.navigationController?.toolbar.isTranslucent = true