我正在使用restKit +核心数据堆栈。这不是一个大问题,但它只是让我感到困扰。这是我的代码中唯一的警告。 也许我正在做这个错误。只要给我一些方法来保持沉默。如何在Swift中静默警告3
警告:不可变值'persistentStore'从未使用;考虑用'_'替换或删除它!
{
let persistentStore: NSPersistentStore?
do {
try persistentStore = managedObjectStore?.addSQLitePersistentStore(atPath: storePath, fromSeedDatabaseAtPath: nil, withConfiguration: nil, options: nil)
} catch {
fatalError("Error migrating store")
}
}
Tx,我在后来想到它,它的速度很快。这发生在代码转换之后。 –