Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update textContentType #490

Merged
merged 2 commits into from Jul 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions FirebaseAuthUI/FUIEmailEntryViewController.m 100644 → 100755
Expand Up @@ -235,6 +235,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
cell.textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
cell.textField.returnKeyType = UIReturnKeyNext;
cell.textField.keyboardType = UIKeyboardTypeEmailAddress;
if (@available(iOS 11.0, *)) {
cell.textField.textContentType = UITextContentTypeUsername;
}
[cell.textField addTarget:self
action:@selector(textFieldDidChange)
forControlEvents:UIControlEventEditingChanged];
Expand Down
3 changes: 3 additions & 0 deletions FirebaseAuthUI/FUIPasswordRecoveryViewController.m 100644 → 100755
Expand Up @@ -180,6 +180,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
_emailField.keyboardType = UIKeyboardTypeEmailAddress;
_emailField.autocorrectionType = UITextAutocorrectionTypeNo;
_emailField.autocapitalizationType = UITextAutocapitalizationTypeNone;
if (@available(iOS 11.0, *)) {
_emailField.textContentType = UITextContentTypeUsername;
}
[cell.textField addTarget:self
action:@selector(textFieldDidChange)
forControlEvents:UIControlEventEditingChanged];
Expand Down
6 changes: 6 additions & 0 deletions FirebaseAuthUI/FUIPasswordSignInViewController.m 100644 → 100755
Expand Up @@ -256,13 +256,19 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
_emailField.keyboardType = UIKeyboardTypeEmailAddress;
_emailField.autocorrectionType = UITextAutocorrectionTypeNo;
_emailField.autocapitalizationType = UITextAutocapitalizationTypeNone;
if (@available(iOS 11.0, *)) {
_emailField.textContentType = UITextContentTypeUsername;
}
} else if (indexPath.row == 1) {
cell.label.text = FUILocalizedString(kStr_Password);
_passwordField = cell.textField;
_passwordField.placeholder = FUILocalizedString(kStr_EnterYourPassword);
_passwordField.secureTextEntry = YES;
_passwordField.returnKeyType = UIReturnKeyNext;
_passwordField.keyboardType = UIKeyboardTypeDefault;
if (@available(iOS 11.0, *)) {
_passwordField.textContentType = UITextContentTypePassword;
}
}
[cell.textField addTarget:self
action:@selector(textFieldDidChange)
Expand Down
17 changes: 13 additions & 4 deletions FirebaseAuthUI/FUIPasswordSignUpViewController.m 100644 → 100755
Expand Up @@ -176,10 +176,10 @@ - (void)signUpWithEmail:(NSString *)email
}];
}];
} else {
[self.auth createUserAndRetrieveDataWithEmail:email
password:password
completion:^(FIRAuthDataResult *_Nullable authDataResult,
NSError *_Nullable error) {
[self.auth createUserWithEmail:email
password:password
completion:^(FIRAuthDataResult *_Nullable authDataResult,
NSError *_Nullable error) {
if (error) {
[self decrementActivity];

Expand Down Expand Up @@ -267,6 +267,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
_emailField.keyboardType = UIKeyboardTypeEmailAddress;
_emailField.autocorrectionType = UITextAutocorrectionTypeNo;
_emailField.autocapitalizationType = UITextAutocapitalizationTypeNone;
if (@available(iOS 11.0, *)) {
_emailField.textContentType = UITextContentTypeUsername;
}
} else if (indexPath.row == 1) {
cell.label.text = FUILocalizedString(kStr_Name);
cell.accessibilityIdentifier = kNameSignUpCellAccessibilityID;
Expand All @@ -275,6 +278,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
_nameField.secureTextEntry = NO;
_nameField.returnKeyType = UIReturnKeyNext;
_nameField.keyboardType = UIKeyboardTypeDefault;
if (@available(iOS 10.0, *)) {
_nameField.textContentType = UITextContentTypeName;
}
} else if (indexPath.row == 2) {
cell.label.text = FUILocalizedString(kStr_Password);
cell.accessibilityIdentifier = kPasswordSignUpCellAccessibilityID;
Expand All @@ -285,6 +291,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
_passwordField.rightViewMode = UITextFieldViewModeAlways;
_passwordField.returnKeyType = UIReturnKeyNext;
_passwordField.keyboardType = UIKeyboardTypeDefault;
if (@available(iOS 11.0, *)) {
_passwordField.textContentType = UITextContentTypePassword;
}
}
[cell.textField addTarget:self
action:@selector(textFieldDidChange)
Expand Down
3 changes: 3 additions & 0 deletions FirebaseAuthUI/FUIPasswordVerificationViewController.m 100644 → 100755
Expand Up @@ -217,6 +217,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
_passwordField.secureTextEntry = YES;
_passwordField.returnKeyType = UIReturnKeyNext;
_passwordField.keyboardType = UIKeyboardTypeDefault;
if (@available(iOS 11.0, *)) {
_passwordField.textContentType = UITextContentTypePassword;
}
[cell.textField addTarget:self
action:@selector(textFieldDidChange)
forControlEvents:UIControlEventEditingChanged];
Expand Down
3 changes: 3 additions & 0 deletions FirebasePhoneAuthUI/FUIPhoneEntryViewController.m 100644 → 100755
Expand Up @@ -265,6 +265,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
_phoneNumberField.autocapitalizationType = UITextAutocapitalizationTypeNone;
_phoneNumberField.returnKeyType = UIReturnKeyNext;
_phoneNumberField.keyboardType = UIKeyboardTypeNumberPad;
if (@available(iOS 10.0, *)) {
_phoneNumberField.textContentType = UITextContentTypeTelephoneNumber;
}
[_phoneNumberField becomeFirstResponder];
if (_phoneNumber) {
_phoneNumberField.text = _phoneNumber.rawPhoneNumber;
Expand Down