get all enum cases swift code example
Example: swift enum all cases
enum Animal: CaseIterable {
case monkey
case leon
}
Animal.allCases.forEach { print($0) }
enum Animal: CaseIterable {
case monkey
case leon
}
Animal.allCases.forEach { print($0) }