SecureField
public struct SecureField : View
A view into which the user securely enters private text.
-
Declaration
Swift
public var viewStore: ViewValues -
Declaration
Swift
public var body: View { get } -
Creates an instance with a a value of type
String.Declaration
Swift
public init(_ title: String, text: Binding<String>, onCommit: @escaping () -> Void = {})Parameters
titleThe title of
self, used as a placeholder.textThe text to be displayed and edited.
onCommitThe action to perform when the user performs an action (usually the return key) while the
SecureFieldhas focus. -
Sets if this view is the first responder or not.
Setting a value of
truewill make this view become the first responder if not already. Setting a value offalsewill make this view resign beign first responder if it is the first responder.Important
Not SwiftUI compatible.Declaration
Swift
public func firstResponder(_ firstResponder: Binding<Bool>) -> SecureField
View on GitHub
SecureField Structure Reference