ios '+entityForName: nil is not a legal NSPersistentStoreCoordinator for searching for entity name '

我這引發這個問題是因爲我創建完context後沒有和store進行綁定,導致當前的context中的store是nil,然後由context中的store再去搜索實體當然就異常啦。 添加     _context.persistentStoreCoordinator = store; 就ok了
相關文章
相關標籤/搜索