我正在将 swift 1.2 转换为 swift 3.2 这里 init 显示错误任何建议
var context:NSManagedObjectContext
var psc:NSPersistentStoreCoordinator
var model:NSManagedObjectModel
var store:NSPersistentStore? = nil
var contextDict = [Int : NSManagedObjectContext]()
var results:NSBatchUpdateResult
init() {
let bundle = Bundle.main
let modelURL =
bundle.url(forResource: "maildough", withExtension:"momd")
model = NSManagedObjectModel(contentsOf: modelURL!)!
psc = NSPersistentStoreCoordinator(managedObjectModel:model)
context = NSManagedObjectContext(concurrencyType:.mainQueueConcurrencyType)
context.persistentStoreCoordinator = psc
} ///getting error here
从初始化程序返回错误而不初始化所有存储的属性