I'm trying to change a Bool property and am receiving an EXC_BAD_ACCESS error.
I'm using XCode 6 and Swift.
The note
property saves fine but the completed
property throws the EXC_BAD_ACCESS
error
import Foundation
import CoreData
class Task: NSManagedObject
{
@NSManaged var note: String!
@NSManaged var completed: Bool
}
Changing out the property routine
// taskObject is an instance of Task()
// Set the completed flag
taskObject.completed = true // EXC_BAD_ACCESS
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…