我有一個字段DB像下面如何檢索CoreData滿足條件迅速2
緯度經度標誌 54.1425 98.2564 0 52.1036 94.1458 3 51.1569 92.1458 3 50.1326 91.1458 3 56.1236 93.1458 0
我需要檢索具有標誌記錄爲3
let fetchRequest = NSFetchRequest()
let appDelegate =
UIApplication.sharedApplication().delegate as! AppDelegate
let managedContext = appDelegate.managedObjectContext
let entityDescription = NSEntityDescription.entityForName("TABLE_LOCATION", inManagedObjectContext: managedContext)
// Configure Fetch Request
fetchRequest.entity = entityDescription
do {
let result = try managedContext.executeFetchRequest(fetchRequest)
//print(result)
} catch {
let fetchError = error as NSError
print(fetchError)
}
我只有上面的代碼從表格中檢索所有記錄TABLE_LOCATION任何代碼或工作示例都非常感謝
謝謝!
謝謝...它的工作 – Carey