Enumerações Swift .toRaw e .fromRaw com o Xcode 6.1
No Xcode 6.1, as enumeraçõestoRaw
efromRaw
funções não funcionam mais:
enum TestEnum : String {
case A = "a"
case B = "b"
}
if let a = TestEnum.fromRaw("a") {
prinln(a.toRaw())
}
Erros:
'TestEnum' does not have a member named 'toRaw'
'TestEnum.Type' does not have a member named 'fromRaw'