SegmentedControl
A native segmented picker with value-selection and neutral Xcode-style tab roles.
#Import
Import SwiftUiPicker from quickgui.
use quickgui::*;#Usage
SwiftUiPicker::segmented(
1,
"code",
[SwiftUiPickerOption::new("code", "Code"), SwiftUiPickerOption::new("preview", "Preview")],
)#API reference
Expand an entry for its description and complete signature. A dash means no declaration default is documented.
SwiftUiPicker
View sourcepub fn segmented( id: u64, selection: impl Into<Arc<str>>, options: impl IntoIterator<Item = SwiftUiPickerOption>, ) -> SelfConvenience constructor for SwiftUI's segmented picker style.
newpub fn new( id: u64, selection: impl Into<Arc<str>>, options: impl IntoIterator<Item = SwiftUiPickerOption>, ) -> Self—
Configures new for this part.
pub fn new( id: u64, selection: impl Into<Arc<str>>, options: impl IntoIterator<Item = SwiftUiPickerOption>, ) -> SelfView sourcetabspub fn tabs( id: u64, selection: impl Into<Arc<str>>, options: impl IntoIterator<Item = SwiftUiPickerOption>, ) -> Self—
Convenience constructor for segmented tab navigation.
pub fn tabs( id: u64, selection: impl Into<Arc<str>>, options: impl IntoIterator<Item = SwiftUiPickerOption>, ) -> SelfView sourcestylepub fn style(mut self, style: SwiftUiPickerStyle) -> Self—
labelpub fn label(mut self, label: impl Into<Arc<str>>) -> Self—
Configures label for this part.
pub fn label(mut self, label: impl Into<Arc<str>>) -> SelfView sourcetest_idpub fn test_id(mut self, test_id: impl Into<Arc<str>>) -> Self—
Configures test id for this part.
pub fn test_id(mut self, test_id: impl Into<Arc<str>>) -> SelfView sourcemodifierpub fn modifier(mut self, modifier: SwiftUiModifier) -> Self—
Configures modifier for this part.
pub fn modifier(mut self, modifier: SwiftUiModifier) -> SelfView sourcemodifierspub 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>) -> SelfView sourceon_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) -> SelfView source