It is necessary to make approximately such a structure, i.e. petals depend on branches
enum Cars { enum Toyota: String { case Camry case Avensis case Corolla case Avalon } enum Mercedes: String { case S_600 case G_65_AMG case C_63_AMG } enum Volkswagen: String { case Passat case Golf case Touareg case Polo case Vento case Jetta } } Cars.Toyota.Avensis // Avensis, но эта строка не говорит что тойота Maybe you need to do something together with the structure ?
From the new type you need:
- Work with switch throughout the structure, so that you can work not only with models, but also with brands, for example, with all Toyota
- You can store in the database and "raise" this type from the line, or something else, in general, you need to store something like "Toyota.Camry" in the database and from this line get this new type
Only I study swift , there was no experience at all with structures and listings . In the book and articles that found only elementary examples. Maybe I did not go there at all?
