Ocultar una contraseña de UITextField
Estoy haciendo una página de inicio de sesión. Tengo UITextField para la contraseña.
Obviamente, no quiero que se vea la contraseña; en su lugar, quiero que se muestren círculos al escribir. ¿Cómo se establece el campo para que esto suceda?
9 answers
Por favor, establezca su propiedad UITextField segura..
Prueba esto..
textFieldSecure.secureTextEntry = YES;
TextFieldSecure es tu UITextField...
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-07-05 06:51:59
Uno puede hacer esto para Ocultar una contraseña UITextField:
CÓDIGO
Objetivo-C:
textField.secureTextEntry = YES;
Swift:
textField.isSecureTextEntry = true
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-03-13 15:20:05
En Interface Builder, establezca la propiedad Secure CheckBox
O
En el conjunto de códigos
Objetivo-C:
yourTextField.secureTextEntry = YES;
Swift:
yourTextField.secureTextEntry = true
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-01-06 06:47:36
Establezca la propiedad secureTextEntry
en YES
.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-07-05 06:48:07
Abra el archivo Xib y abra el inspector del campo de texto de contraseña y marque la propiedad secure.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-07-05 07:14:28
Para Swift 3.0:
txtpassword.isSecureTextEntry = true
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-04-06 07:32:31
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-07-13 17:26:32
En Swift 3.0 o posterior
passwordTextField.isSecureTextEntry = true
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-08-29 13:21:09
txt_Password = new UITextField {
Frame = new RectangleF (20,40,180,31),
BorderStyle = UITextBorderStyle.Bezel,
TextColor = UIColor.Black,
SecureTextEntry = true,
Font = UIFont.SystemFontOfSize (17f),
Placeholder = "Enter Password",
BackgroundColor = UIColor.White,
AutocorrectionType = UITextAutocorrectionType.No,
KeyboardType = UIKeyboardType.Default,
ReturnKeyType = UIReturnKeyType.Done,
ClearButtonMode = UITextFieldViewMode.WhileEditing,
};
SecureTextEntry establece true.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-07-08 08:36:05