Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

Swift e Over enum Cases

// conform Languages to caseIterable 
enum Season: CaseIterable {
  case spring, summer, autumn, winter 
}

// for loop to iterate over all cases
for currentSeason in Season.allCases {
  print(currentSeason)
}
 
PREVIOUS NEXT
Tagged: #Swift #Over #enum #Cases
ADD COMMENT
Topic
Name
3+9 =