So I have an enumeration defined as the following:
enum CardPosition {
case top(CGFloat)
case middle(CGFloat)
case bottom(CGFloat)
}
I have a variable of type CardPosition that is defined as:
@State private var position: CardPosition = CardPosition.bottom(UIScreen.main.bounds.height - 100)
How do I access the value of the CardPosition? In this case, I'm trying to access the UIScreen.main.bounds.height - 100 value from the enumeration. I tried accessing it with
self.position.rawValue
but unfortunately this doesn't work. Anyone know how I can access the CGFloat value of position?