Swift Enum с оператором Switch
enum PizzaSize {
case small, medium, large
}
var size = PizzaSize.medium
switch(size) {
case .small:
print("I ordered a small size pizza.")
case .medium:
print("I ordered a medium size pizza.")
case .large:
print("I ordered a large size pizza.");
}
SAMER SAEID