我目前正在开发一款应用,您可以在地图上设置引脚并检索与该应用相关联的Flickr图像。
出于某种原因,引发了以下错误:
- [Photo copyWithZone:]:无法识别的选择器发送到实例
奇怪的是,我的项目中没有任何名为“copyWithZone”的东西,我不知道它是怎么来的。如何找到项目中出现错误的部分?
我创建的Photo类只继承自NSManagedObject,并且在for循环的第四行的以下函数中抛出错误:
func isDownloading() -> Bool {
var result = false
for next in self.photos {
if let downloadWorker = PendingPhotoDownloads.sharedInstance().downloadInProgress[next.description.hashValue] as? PhotoDownloadWorker {
if downloadWorker.isDownloading() {
result = true
break
}
}
}
return result
}
提前谢谢。