Enumeration converting to a string in Swift
Forums:
enum Season {
case Summer, Fall, Winter, Spring
}
let winter = Season.Winter
let strValue = "\(winter)"
//strValue is Season.Winter
- Log in to post comments
enum Season {
case Summer, Fall, Winter, Spring
}
let winter = Season.Winter
let strValue = "\(winter)"
//strValue is Season.Winter