Post

Replies

Boosts

Views

Activity

Comment on Save Image in Core Data. Please Help!
Interesting. How do you save the file path to the image in the phone? And what happens if the image is deleted? Wouldn't it (if not crash) fail to load the image? Wouldn't it just be best to use a copied version of the image so that editing or deleting wouldn't affect it?? Thanks for your help!
Jul ’22
Comment on Calendar with Correlating Data. Please Help!!!
I tested my code and the calendar only contains date and no time so when I use to to create and object it does it at exactly midnight and that is also what is fetched. I used to use a range in my predicates that cover the whole day but I didn't like how it looked so I just figured out what time of day is stored when you don't give it time and its midnight or something. I tested this with print by printing the date variable and the items[0].date and they matched perfectly
Jun ’22
Comment on Calendar with Correlating Data. Please Help!!!
I use apples offered construction of core data so in the app file I have this: struct ReciPlannerApp: App {     let persistenceController = PersistenceController.shared     var body: some Scene {         WindowGroup {             ContentView()                 .environment(\.managedObjectContext, persistenceController.container.viewContext)         }     } }
Jun ’22
Comment on EditView Reference is Broken
Okay done that in my own version of this and now its saying "Value of optional type 'Int?' must be unwrapped to a value of type 'Int'" and telling me to set a default value Edit: Never mind I just put 0 as the default value... it works, but its kinda slow. Edit, Edit: Never mind that its just slow on the simulation. This works perfectly!
Jun ’22