2022-07-16 00:14:02 +10:00
|
|
|
use crate::foundation::NSUInteger;
|
2021-01-19 19:11:52 +11:00
|
|
|
|
|
|
|
/// The type of spinner style you're after.
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub enum ProgressIndicatorStyle {
|
|
|
|
/// A loading bar.
|
|
|
|
Bar,
|
|
|
|
|
|
|
|
/// A spinning circle.
|
|
|
|
Spinner
|
|
|
|
}
|
|
|
|
|
|
|
|
impl From<ProgressIndicatorStyle> for NSUInteger {
|
|
|
|
fn from(style: ProgressIndicatorStyle) -> Self {
|
|
|
|
match style {
|
|
|
|
ProgressIndicatorStyle::Bar => 0,
|
|
|
|
ProgressIndicatorStyle::Spinner => 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|