             tableView.separatorStyle = .singleLine
             navigationItem.leftBarButtonItem = editButtonItem
         }
+    }
+    
+    // MARK: UIImagePickerControlDelegate
+    
+    func imagePickerController(_ picker: UIImagePickerController,
+                               didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
+        guard let selectedQRCode = info[UIImagePickerController.InfoKey.originalImage] as? UIImage,
+            let detector = CIDetector(ofType: CIDetectorTypeQRCode,
+                                      context: nil,
+                                      options: [CIDetectorAccuracy: CIDetectorAccuracyHigh]),
+            let ciImage = CIImage(image: selectedQRCode),
+            let features = detector.features(in: ciImage) as? [CIQRCodeFeature] else { return }
+
+        let qrCodeURL = URL(string: features.reduce("") { $0 + ($1.messageString ?? "") })
+
+        if qrCodeURL != nil, let account = Account(url: qrCodeURL!) {
+            self.createAccount(account)
+        }
+        
+        dismiss(animated: true, completion: nil)
     }
 
     // MARK: UITableViewDataSource


    private func makeAddAccountAlertController() -> UIAlertController {
        let title = "Add Account"
        let message = "Add an account by scanning a QR code or enter a secret manually."
        let alertController = UIAlertController(title: title, message: message, preferredStyle: .actionSheet)

        let scanQRCode = UIAlertAction(title: "Scan QR Code", style: .default) { [unowned self] _ in
            self.performSegue(withIdentifier: "ScanSegue", sender: self)
        }

        let enterManually = UIAlertAction(title: "Enter Manually", style: .default) { [unowned self] _ in
            self.performSegue(withIdentifier: "EnterManuallySegue", sender: self)

            selector: #selector(deselectSelectedTableViewRow),
            name: UIMenuController.willHideMenuNotification,
            object: nil)
        
        qrImporter.delegate = self
    }

    @objc func deselectSelectedTableViewRow() {
