Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

enum raw value swift

enum numbers: Int {
 case one = 1, two, three, four
}

let num = numbers.one
print(num.rawValue) // Output: 1
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #enum #raw #swift
ADD COMMENT
Topic
Name
3+4 =