I’m trying to log an enum:
enum CKAccountStatus : Int {
case CouldNotDetermine
case Available
case Restricted
case NoAccount
}
NSLog("%i", CKAccountStatus.Available)
The compiler complains:
Type 'CKAccountStatus' does not conform to protocol 'CVarArg'
Why? I have tried to cast the value:
NSLog("%i", CKAccountStatus.Available as Int)
But that doesn’t fly either:
Cannot convert the expression's type '()' to type 'String'