Swift Enum - Casting Nested Enums to String Enum to allow .rawValue

后端 未结 0 672
悲哀的现实
悲哀的现实 2021-02-06 00:56

What I have

enum Item {
    case animal(AnimalId)
    case vehicle(VehicleId)
    case food(FoodId)
    
    var rawValue: String {
        switch self {
               


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题