草庐IT

CKAccountStatus

全部标签

swift - 使用 NSLog 记录 Swift 枚举

我正在尝试记录一个枚举:enumCKAccountStatus:Int{caseCouldNotDeterminecaseAvailablecaseRestrictedcaseNoAccount}NSLog("%i",CKAccountStatus.Available)编译器提示:Type'CKAccountStatus'doesnotconformtoprotocol'CVarArg'为什么?我试图投值:NSLog("%i",CKAccountStatus.AvailableasInt)但这也不会飞:Cannotconverttheexpression'stype'()'totype

swift - 使用 NSLog 记录 Swift 枚举

我正在尝试记录一个枚举:enumCKAccountStatus:Int{caseCouldNotDeterminecaseAvailablecaseRestrictedcaseNoAccount}NSLog("%i",CKAccountStatus.Available)编译器提示:Type'CKAccountStatus'doesnotconformtoprotocol'CVarArg'为什么?我试图投值:NSLog("%i",CKAccountStatus.AvailableasInt)但这也不会飞:Cannotconverttheexpression'stype'()'totype