diff --git a/momoIOS/Authentication/Controller/AuthCommonConstants.swift b/momoIOS/Authentication/Controller/AuthCommonConstants.swift index 444ca64..b369563 100644 --- a/momoIOS/Authentication/Controller/AuthCommonConstants.swift +++ b/momoIOS/Authentication/Controller/AuthCommonConstants.swift @@ -20,13 +20,14 @@ let welcomeTitle: UILabel = { }() // MARK: - UITextField -func inputContainerView(placeholder: String) -> UITextField { +func inputContainerView(placeholder: String, isSecureField: Bool = false) -> UITextField { let textfield = UITextField() textfield.heightAnchor.constraint(equalToConstant: 55).isActive = true textfield.placeholder = placeholder textfield.borderStyle = .roundedRect textfield.font = UIFont.systemFont(ofSize: 16) textfield.attributedPlaceholder = NSAttributedString(string: placeholder, attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray]) + textfield.isSecureTextEntry = isSecureField return textfield } diff --git a/momoIOS/Authentication/Controller/LoginController.swift b/momoIOS/Authentication/Controller/LoginController.swift index cef91c8..bdb7bdd 100644 --- a/momoIOS/Authentication/Controller/LoginController.swift +++ b/momoIOS/Authentication/Controller/LoginController.swift @@ -24,7 +24,7 @@ class LoginController: UIViewController { }() private lazy var passwordTextField: UITextField = { - return inputContainerView(placeholder: "비밀번호를 입력해주세요") + return inputContainerView(placeholder: "비밀번호를 입력해주세요", isSecureField: true) }() private let loginButton: UIButton = { diff --git a/momoIOS/Authentication/Controller/RegistrationController.swift b/momoIOS/Authentication/Controller/RegistrationController.swift index 4e2a947..a7f1604 100644 --- a/momoIOS/Authentication/Controller/RegistrationController.swift +++ b/momoIOS/Authentication/Controller/RegistrationController.swift @@ -23,7 +23,7 @@ class RegistrationController: UIViewController { }() private lazy var passwordTextField: UITextField = { - return inputContainerView(placeholder: "비밀번호를 입력해주세요") + return inputContainerView(placeholder: "비밀번호를 입력해주세요", isSecureField: true) }() private let validPasswordFormatLabel: UILabel = { @@ -36,7 +36,7 @@ class RegistrationController: UIViewController { }() private lazy var checkPasswordTextField: UITextField = { - return inputContainerView(placeholder: "비밀번호를 재입력해주세요") + return inputContainerView(placeholder: "비밀번호를 재입력해주세요", isSecureField: true) }() private let confirmPasswordLabel: UILabel = {