我正在尝试记录一个枚举:
原文链接:https://www.f2er.com/swift/320709.htmlenum CKAccountStatus : Int { case CouldNotDetermine case Available case Restricted case NoAccount } NSLog("%i",CKAccountStatus.Available)
编译器抱怨:
Type 'CKAccountStatus' does not conform to protocol 'CVarArg'
为什么?我试图铸造价值:
NSLog("%i",CKAccountStatus.Available as Int)
但这不是飞行的:
Cannot convert the expression's type '()' to type 'String'