SecureField
TextField と同じ制御規約を持つ、入力内容を隠すネイティブエディターです。
#インポート
github.com/egoist/quickgui/go/ui から ui をインポートします。
import (
"github.com/egoist/quickgui/go/native"
"github.com/egoist/quickgui/go/ui"
)#使い方
func SwiftUiSecureFieldExample() *native.Node {
text, setText := ui.CreateSignal("")
return ui.SwiftUI.Host(
ui.SwiftUIHostProps{MatchContents: true},
func() *native.Node {
return ui.SwiftUI.SecureField(ui.SwiftUITextFieldProps{
Value: text,
Placeholder: "Enter text",
OnValueChange: func(next string, _ *native.Event) { setText(next) },
})
},
)
}#API リファレンス
項目を展開すると説明と完全なシグネチャが表示されます。ダッシュは宣言に既定値が記載されていないことを示します。
SwiftUI.SecureField
ソースを見るui.SwiftUI.SecureField(props SwiftUITextFieldProps) *native.NodeTestIDany—
Modifiersany—
Reffunc(*native.Node)—
Receives the retained native node after construction. Keep imperative work in event or lifecycle callbacks.
func(*native.Node)ソースを見るValueany—
The current controlled value. Update application state from the change callback to accept a new value.
anyソースを見るPlaceholderany—
OnValueChangefunc(string, *native.Event)—
Reports an accepted value change. Use the callback payload to update controlled state.
func(string, *native.Event)ソースを見る