Obscure a UITextField password

前端 未结 9 982
生来不讨喜
生来不讨喜 2020-12-07 15:20

I am doing a login page. I have UITextField for password.

Obviously, I do not want the password to be seen; instead, I want circles to show when typing. How do you s

相关标签:
9条回答
  • 2020-12-07 15:38

    in Swift 3.0 or later

    passwordTextField.isSecureTextEntry = true
    
    0 讨论(0)
  • 2020-12-07 15:38

    Simply check Secure Text Entry check box on the storyboard

    0 讨论(0)
  • 2020-12-07 15:40

    Please set your UItextField property secure..

    Try this..

    textFieldSecure.secureTextEntry = true
    

    textFieldSecure is your UITextField...

    0 讨论(0)
  • 2020-12-07 15:41

    Set the secureTextEntry property to YES.

    0 讨论(0)
  • 2020-12-07 15:42

    In Interface Builder check the "Secure Text Entry" checkbox

    or

    In code set:

    Objective-C:

    yourTextField.secureTextEntry = YES;
    

    Swift:

    yourTextField.secureTextEntry = true
    
    0 讨论(0)
  • 2020-12-07 15:45

    For Swift 3.0:

    txtpassword.isSecureTextEntry = true
    
    0 讨论(0)
提交回复
热议问题