Member-only story
How to convert enum case to the string type?
Oct 20, 2020
Sometime, you might need the enum’s case name as a string, but the rawValue.
In that case, you need the class
“String(describing:)”
Use this.
String(describing: YOURENUM.YOURCASE)
and then ‘YOURCASE’ will be printed.