You're welcome, friend! Feel free to come back or post again if you need more help. Have a good one!
Post
Replies
Boosts
Views
Activity
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!
No, I’m using SwiftUI instead of UIKit. But yes this is exactly what I want lol.
AHHHH!!! This works beautifully! Well done!
And yeah I believe 4. is the defining problem, unfortunately. I'm very curious to see what you've done. To solve this.
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
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)
}
}
}
I’m not sure. I don’t use @aharriscrowne ‘s method
Please see https://developer.apple.com/forums/thread/708915 Thanks!
Please see https://developer.apple.com/forums/thread/708915 Thanks!
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!
But I have no idea how to use UIKit lol
I’ll close the thread after I check it when I get home. All the best!!
I’m away from my computer but that’s GOT to be it. Bro you’re so clutch!
Wait, how would you store recipes in the list entity if you deleted the recipes attribute, again? I’m confused.
Also yes I cleaned my build folder. No luck :(