Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

caseiterable swift

enum Color: CaseIterable {
    case red, green, blue
}
// example:
for color in Color.allCases {
    print("My favorite color is (color).")
}
Source by www.hackingwithswift.com #
 
PREVIOUS NEXT
Tagged: #caseiterable #swift
ADD COMMENT
Topic
Name
1+3 =