本文へスキップ

Gauge

線形と円形のアクセサリースタイルに対応した、ネイティブ SwiftUI Gauge です。

#インポート

github.com/egoist/quickgui/go/ui から ui をインポートします。

import (
	"github.com/egoist/quickgui/go/ui"
)

#使い方

func SwiftUiGaugeExample() *native.Node {
	return ui.SwiftUI.Host(
		ui.SwiftUIHostProps{MatchContents: true},
		func() *native.Node {
			return ui.SwiftUI.Gauge(ui.SwiftUIGaugeProps{
				Value: 60,
				Min:   0,
				Max:   100,
				Label: "Capacity",
				Style: "accessoryLinearCapacity",
			})
		},
	)
}

#API リファレンス

項目を展開すると説明と完全なシグネチャが表示されます。ダッシュは宣言に既定値が記載されていないことを示します。

SwiftUI.Gauge

ソースを見る
ui.SwiftUI.Gauge(props SwiftUIGaugeProps) *native.Node
TestIDany—

Stable identifier for native automation and tests.

any
ソースを見る
Modifiersany—

Ordered SwiftUI view modifiers applied to the hosted control.

any
ソースを見る
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
ソースを見る
Minany—

Lower bound of the accepted value.

any
ソースを見る
Maxany—

Upper bound of the accepted value.

any
ソースを見る
Labelany—

Visible native SwiftUI control label.

any
ソースを見る
CurrentValueLabelany—

Readable label for the current native progress or gauge value.

any
ソースを見る
MinimumValueLabelany—

Accessible label for the minimum end of the range.

any
ソースを見る
MaximumValueLabelany—

Accessible label for the maximum end of the range.

any
ソースを見る
Stylestring—

Reusable layout, typography, color, and interaction-state styles. Build with ui.Style() and compose with Merge.

string
ソースを見る