5839 views and only 165 likes? Man, I am blown by this tutorial and I can never understand user behaviour. All I can say is a BIG THANK YOU.
@AvantjerTube Жыл бұрын
It may be that some viewers found this video to be overly, (unnecessarily?), complex. I, for one, will not be "liking" it because I'm still glazed over from all the "helpfulness". Maybe some of us would prefer a "for dummies" version. 🤓
@Yannemal Жыл бұрын
this completely went over my head the first time I attempted it. Rewatching it and resisting the urge to go straight for the shiny new SwiftData
@kslazinski2 жыл бұрын
Thank you for this and every other video, Paul. It’s very cool how you show practical examples of how things work. Easy to learn and implement in other apps. Thanks for the work you’re doing to help other people learn how to code
@lapusan20082 жыл бұрын
OMG! you’ve saved my ass. I’ve been trying endlessly for a solution until I’ve watched this video. Thank you!!
@Pedro76mchlkg3 жыл бұрын
I can’t thank you enough. You have the gift to make everything easier to understand. BTW, I would love to see a tutorial about core data in MVVM, or an explanation about why I should or should not separate core data from the view. Thank you so much for your tutorials!
@a.h.m13653 жыл бұрын
as I Think Paul not a big fan of mvvm with swiftui
@DavidNitzscheBell2 жыл бұрын
@@a.h.m1365 why do you think that? I've seen nothing to support that.
@Y0sid02 ай бұрын
Great explanatiom - structured and detailed You rock!
@AvantjerTube Жыл бұрын
Yikes! Such a long distance to have to go for something seemingly simple. (I'm Discouraged 😟) ...but I'm very impressed by **your** cleverness. 🤓 Disclaimer: I'm a total newbie to Core Data in SwiftUI. Newb Question: Is there a reason you wouldn't create a fetch request inside the .xcdatamodeld file ? Thanks
@VykingBoy8 ай бұрын
I used this approach to change the predicate in the init() for a fetch of Annotations on a Map in MapKit. Works fine but if I change a property on any of the fetched results objects then it removes the Object from the fetched results resulting in that Annotation disappearing from the map !
@lincolndickerson12932 жыл бұрын
I am so glad I stuck around. The second half of this lesson is worth my weight in Mithril (Sorry you said Lord of the Rings) . This is the best explanation of generics I have seen and by attaching to the CoreData fetch it over the top. Curious why you don't use #keyPath(Singer.lastName) Also I tend to level the leave Codegen as Class Definition and simply use extension in a separate file like this list for computed properties extension Singer { public var unwrappedLastName: String { lastName ?? "unknown" } } In doing so I feel it is easy in that I never have to regenerate the Entity manually
@nitesh-maharaj3 жыл бұрын
I do like the generic solution, although one change I'd make to add a bit more flexibility to this is pass in an NSPredicate to the initializer. So if for example the caller wants to filter on first or last name, then they could just change their predicate and aren't bound to the functionality of the black-boxed view. Thanks Paul.
@DavidNitzscheBell2 жыл бұрын
I agree with you, sort of. This video shows precisely what you describe, being able to filter on first or last name. But, it doesn't allow for filters that are not "BEGINWITH". So, yes, it would be nice to have the predicate be a parameter. We should try it out. Also, I need to figure out how to allow the filter to also sort, dynamically.
@nitesh-maharaj2 жыл бұрын
@@DavidNitzscheBell To filter dynamically, the @FetchRequest should be in a sub view.
@Corban_Dallas3 жыл бұрын
Very thanks! But I think making manual codegen for Singer class is a little excessive. We can just create extension for Singer class to add two value wrappers. It will be little simpler to do and look cleaner.
@DavidNitzscheBell2 жыл бұрын
can you create an extension for Singer class if the Singer class is not created in code? Hmmmmmm. (testing...) Oh, wow! Yes, it seems you *can* create an extension. Clever!
@DavidNitzscheBell2 жыл бұрын
oooooh, this looks really good. I definitely need it.....
@OttoSchmilinsky2 жыл бұрын
Why does everyone write all the code inside the ContentView? Nobody makes subviews in other files, and I only found one that did the views but did not create the previews to see them on canvas. can you recommend me a book of complete MVVM examples? Thanks in advance.
@blinkpo42 жыл бұрын
Hi! Have you been able to find any useful books? I have the same problem. Applying MVVM with Core Data, FetchRequest and SwiftUI is a nightmare. Thanks in advance.
@mikehimself9092 жыл бұрын
I found Paul’s video very helpful: kzbin.info/www/bejne/oZfWcmttprd2abs
@javed25472 жыл бұрын
Is there any thread safety issues with passing the actual NSManagedObjects around?
@srome071111 ай бұрын
What is the data store changes though?
@bbulliard2 жыл бұрын
Well done. Very, very nice! Thank you!
@willianvicentini1135 Жыл бұрын
Muito bom o video, uma duvida como faria para processar o resultado e totalizar algum campo de valor...
@lawho41892 жыл бұрын
Great tutorial !!! help me a lot, may I ask how to count the total number of item after filtered ??
@Moxific2 жыл бұрын
What if we'd like to filter with two or more filter keys ?
@GenZRadio2342 жыл бұрын
_ means your writing to the setter property. Also why not just set the .nspredicate property on your results if you want dynamic filtering🤔. Either way 🙌
@kiohaha2 жыл бұрын
omg its so hard to get the searchbar added to the list with this method. any ideas??
@MoAdel922 жыл бұрын
I think swiftUI team is making this topic a little bit complicated I think the word a or s should be @state variable And then we can change it and the results show update on spot Excuse me i am a beginner with swiftUI But this what i thought 💭
@etronik3339 Жыл бұрын
Wow 🤩
@Eronx2 жыл бұрын
Hi, Is someone here to explain me why we used _fetchRequest and not just regular one?
@DavidNitzscheBell2 жыл бұрын
Paul explained it in the video. It's very technical and tricky, but he explained it...
@yhmlco2 жыл бұрын
Enjoying your videos but you're overcomplicating this one. Just reach into the fetchRequest from button or action handler and change the nsPredicate or nsSortDescriptors. View will automatically refetch.
@mamazur2 жыл бұрын
Hi Paul. Thanks for the amazing tutorial. I have one error