Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我使用 NSSet 时,我得到了这个线程 1:EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)?
这是我的代码:
var doneTask = NSSet() let taskNum = course?.task?.count let doneTask = course?.value(forKey: "length") as! NSSet
使用条件语句修复它以检查对象是否为空。无论如何谢谢你