DatePicker
受控的原生日期或日期时间选择器。
#导入
从 quickgui 导入 SwiftUiDatePicker。
use quickgui::*;#用法
SwiftUiDatePicker::new(1, timestamp).label("Start")#API 参考
展开条目查看说明和完整签名。短横线表示声明中未记录默认值。
SwiftUiDatePicker
查看源码pub fn new(id: u64, value: f64) -> Selfrangepub fn range(mut self, minimum: Option<f64>, maximum: Option<f64>) -> Self—
Configures range for this part.
pub fn range(mut self, minimum: Option<f64>, maximum: Option<f64>) -> Self查看源码componentspub fn components(mut self, components: SwiftUiDatePickerComponents) -> Self—
Configures components for this part.
pub fn components(mut self, components: SwiftUiDatePickerComponents) -> Self查看源码stylepub fn style(mut self, style: SwiftUiDatePickerStyle) -> Self—
labelpub fn label(mut self, label: impl Into<Arc<str>>) -> Self—
test_idpub fn test_id(mut self, test_id: impl Into<Arc<str>>) -> Self—
modifierpub fn modifier(mut self, modifier: SwiftUiModifier) -> Self—
modifierspub fn modifiers(mut self, modifiers: impl IntoIterator<Item = SwiftUiModifier>) -> Self—
Configures modifiers for this part.
pub fn modifiers(mut self, modifiers: impl IntoIterator<Item = SwiftUiModifier>) -> Self查看源码on_value_changepub fn on_value_change(mut self, enabled: bool) -> Self—
Configures on value change for this part.
pub fn on_value_change(mut self, enabled: bool) -> Self查看源码