Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

swift enum all cases

enum Animal: CaseIterable {
    case monkey
    case leon
}

Animal.allCases.forEach { print($0) }
 
PREVIOUS NEXT
Tagged: #swift #enum #cases
ADD COMMENT
Topic
Name
8+1 =