diff --git a/NYPLCardCreator/AddressViewController.swift b/NYPLCardCreator/AddressViewController.swift index aedfafc..a850318 100644 --- a/NYPLCardCreator/AddressViewController.swift +++ b/NYPLCardCreator/AddressViewController.swift @@ -114,6 +114,14 @@ final class AddressViewController: FormTableViewController { self.zipCell.textField.addTarget(self, action: #selector(zipTextFieldDidChange), for: .allEditingEvents) + + if #available(iOS 10.0, *) { + self.street1Cell.textField.textContentType = .streetAddressLine1 + self.street2Cell.textField.textContentType = .streetAddressLine2 + self.cityCell.textField.textContentType = .addressCity + self.regionCell.textField.textContentType = .addressState + self.zipCell.textField.textContentType = .postalCode + } } func checkToPrefillForm() { diff --git a/NYPLCardCreator/NameAndEmailViewController.swift b/NYPLCardCreator/NameAndEmailViewController.swift index 7cf018d..aec8e81 100644 --- a/NYPLCardCreator/NameAndEmailViewController.swift +++ b/NYPLCardCreator/NameAndEmailViewController.swift @@ -81,6 +81,13 @@ final class NameAndEmailViewController: FormTableViewController { self.emailCell.textField.keyboardType = .emailAddress self.emailCell.textField.autocapitalizationType = .none self.emailCell.textField.autocorrectionType = .no + + if #available(iOS 10.0, *) { + self.firstNameCell.textField.textContentType = .givenName + self.middleInitialCell.textField.textContentType = .middleName + self.lastNameCell.textField.textContentType = .familyName + self.emailCell.textField.textContentType = .emailAddress + } } func checkToPrefillForm() {