Skip to content

Instantly share code, notes, and snippets.

View BrianLitwin's full-sized avatar

Brian Litwin BrianLitwin

View GitHub Profile
@BrianLitwin
BrianLitwin / FetchRequestGenerator.swift
Created January 26, 2018 04:46
A Generic fetch request protocol that uses an Associated Type to send fetch requests through an Enum
import CoreData
let context = NSManagedObjectContext(concurrencyType: .mainQueueConcurrencyType)
class Book: NSManagedObject {
var title: String?
var author: Author?
var date: Date?
}