|
@@ -49,6 +49,7 @@ class TextFieldCell:UITableViewCell {
|
|
|
static func makeEmailCell() -> TextFieldCell {
|
|
|
let emailCell = TextFieldCell(description: "Email", placeholder: "you@example.com")
|
|
|
|
|
|
+ // this suggests the own email
|
|
|
emailCell.textField.textContentType = UITextContentType.emailAddress
|
|
|
emailCell.textField.keyboardType = .emailAddress
|
|
|
// switch off quicktype
|
|
@@ -72,8 +73,10 @@ class TextFieldCell:UITableViewCell {
|
|
|
|
|
|
nameCell.textField.autocapitalizationType = .words
|
|
|
nameCell.textField.autocorrectionType = .no
|
|
|
- nameCell.textField.textContentType = UITextContentType.givenName
|
|
|
- nameCell.textField.keyboardType = .namePhonePad
|
|
|
+ // .namePhonePad doesn't support autocapitalization
|
|
|
+ // see: https://stackoverflow.com/a/36365399
|
|
|
+ // therefore we use .default to capitalize the first character of the name
|
|
|
+ nameCell.textField.keyboardType = .default
|
|
|
|
|
|
return nameCell
|
|
|
}
|