SecureField

12/5/2021 swiftiosswiftui

# SecureField

文档:https://developer.apple.com/documentation/swiftui/securefield (opens new window)

用户安全地输入私人文本的控件。

@State var password: String = "1234"
var body: some View {
    SecureField($password)
        .textFieldStyle(RoundedBorderTextFieldStyle())
        .padding()
}
上次更新: 12/6/2021, 5:21:44 PM