Swift enum с соответствующими значениями
enum Distance {
// associate value
case km(String)
case miles(String)
}
// pass string value to km
var dist1 = Distance.km("Metric System")
print(dist1)
// pass string value to miles
var dist2 = Distance.miles("Imperial System")
print(dist2)
SAMER SAEID