소스 검색

fix crash on iPad

Jonas Reinsch 6 년 전
부모
커밋
10015e7472
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      deltachat-ios/CredentialsController.swift

+ 6 - 0
deltachat-ios/CredentialsController.swift

@@ -267,6 +267,12 @@ class CredentialsController: UITableViewController {
                 }))
             }
             actionSheet.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: {a in}))
+
+            if let popoverController = actionSheet.popoverPresentationController {
+                if let cell = tableView.cellForRow(at: indexPath) {
+                    popoverController.sourceView = cell.detailTextLabel
+                }
+            }
             self.present(actionSheet, animated: true, completion: {})
         }
     }