Enumeraciones rápidas .toRaw y .fromRaw con Xcode 6.1
En Xcode 6.1, las enumeracionestoRaw
yfromRaw
las funciones ya no funcionan:
enum TestEnum : String {
case A = "a"
case B = "b"
}
if let a = TestEnum.fromRaw("a") {
prinln(a.toRaw())
}
Errores:
'TestEnum' does not have a member named 'toRaw'
'TestEnum.Type' does not have a member named 'fromRaw'