Przeglądaj źródła

feat: better inputs for settings

dignifiedquire 6 lat temu
rodzic
commit
d1e6887630
1 zmienionych plików z 17 dodań i 0 usunięć
  1. 17 0
      deltachat-ios/TopViews/SettingsController.swift

+ 17 - 0
deltachat-ios/TopViews/SettingsController.swift

@@ -293,6 +293,23 @@ internal final class SettingsViewController: QuickTableViewController {
 
             alertController.addTextField { textField in
                 textField.placeholder = subtitle
+                if title.contains("Password") {
+                    textField.isSecureTextEntry = true
+                    textField.textContentType = .password
+                }
+
+                if title == "Email" {
+                    textField.keyboardType = .emailAddress
+                    textField.textContentType = .username
+                }
+
+                if title.contains("Server") {
+                    textField.keyboardType = .URL
+                }
+
+                if title.contains("Port") {
+                    textField.keyboardType = .numberPad
+                }
             }
 
             alertController.addAction(confirmAction)