Created
August 7, 2019 14:36
-
-
Save PaulWoodIII/5e44fddbb4dd0990f1bd4810a3b0f395 to your computer and use it in GitHub Desktop.
Part of a Feedback to apple on what I want from the new FetchRequest struct in SwiftUI
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
| @Environment(\.managedObjectContext) var managedObjectContext | |
| @State var year = "1880" | |
| @State var ascending = true | |
| @State var someValue = "value" | |
| @FetchRequest( | |
| entity: YearOfBirth.entity(), | |
| sortDescriptors: [NSSortDescriptor(key: "year", ascending: ascending.wrappedValue)], | |
| predicate: NSPredicate(format: "%K = %@", “someAttributeKey”, someValue.wrappedValue) | |
| ) var years: FetchedResults<YearOfBirth> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment