Explorar o código

feat: better inputs for settings

dignifiedquire %!s(int64=6) %!d(string=hai) anos
pai
achega
d1e6887630
Modificáronse 1 ficheiros con 17 adicións e 0 borrados
  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)