【问题标题】:Check / Compare NSError Code in CloudKit?在 CloudKit 中检查/比较 NSError 代码?
【发布时间】:2015-07-15 22:42:01
【问题描述】:

我想这是基本的,但仍然......如何检查我是否收到 ZoneBusy 错误?

if error.code == CKErrorCode.ZoneBusy { // <- compiler says can't use '==', then what?

参考:

https://developer.apple.com/library/prerelease/ios/documentation/CloudKit/Reference/CloudKit_constants/index.html#//apple_ref/c/tdef/CKErrorCode

【问题讨论】:

    标签: ios swift swift2 cloudkit nserror


    【解决方案1】:

    您似乎缺少.rawValue

    应该是这样的:

    CKErrorCode.ZoneBusy.rawValue

    【讨论】:

      猜你喜欢
      • 2014-08-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-10
      • 1970-01-01
      • 1970-01-01
      • 2011-09-08
      • 2013-04-16
      相关资源
      最近更新 更多