Created
November 7, 2016 12:43
-
-
Save michal-majchrzycki/1cce531753f73f248029a79d5d4538a9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let entity = NSEntityDescription.entityForName("Fruits", inManagedObjectContext: context)! | |
fetchRequest.entity = entity | |
fetchRequest.sortDescriptors = [sortTitle] | |
ex.expressionResultType = .DecimalAttributeType | |
fetchRequest.propertiesToFetch = ["colors"] | |
fetchRequest.propertiesToGroupBy = ["colors"] | |
fetchRequest.resultType = .DictionaryResultType | |
let matchingObjects = try! context.executeFetchRequest(fetchRequest) as AnyObject | |
self.expenseCategory = matchingObjects | |
return fetchRequest | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment