Browse Source

return to selected cell after enabling multi-select over voiceOver

cyberta 3 năm trước cách đây
mục cha
commit
c810b52e01
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      deltachat-ios/Chat/ChatViewController.swift

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

@@ -233,6 +233,11 @@ class ChatViewController: UITableViewController {
                     guard let self = self else { return }
                     let messageId = self.messageIds[indexPath.row]
                     self.setEditing(isEditing: true, selectedAtIndexPath: indexPath)
+                    if UIAccessibility.isVoiceOverRunning {
+                        DispatchQueue.main.asyncAfter(deadline: .now() + 0.1, execute: { [weak self] in
+                            UIAccessibility.post(notification: .layoutChanged, argument: self?.tableView.cellForRow(at: indexPath))
+                        })
+                    }
                 }
             }
         )