Gauge
原生 SwiftUI 仪表,支持线性和圆形附属样式。
#导入
从 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.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查看源码Minany—
Maxany—
Labelany—
CurrentValueLabelany—
MinimumValueLabelany—
MaximumValueLabelany—
Stylestring—
Reusable layout, typography, color, and interaction-state styles. Build with ui.Style() and compose with Merge.
string查看源码