If you enjoy my teaching style, I've started to create my own courses that you can check out here: courses.iosacademy.io/
@Harshkumar-rk6gp3 жыл бұрын
Can I get the source code for the video please?
@reece5863 Жыл бұрын
Love how fluid your coding is my bro, it just flows. Thanks for the video.
@iOSAcademy Жыл бұрын
Glad you enjoy it!
@AnkitGupta-hv2xe2 жыл бұрын
I’ve been watching most of your tutorials, really like your content and way of explaining. Its very helpful :-)
@iOSAcademy2 жыл бұрын
Thanks!
@jeffreywilkinson14713 жыл бұрын
Love the teaching style and the video! Your content is fantastic. Much appreciated. 🙏
@iOSAcademy3 жыл бұрын
Thank you!
@MAbbas-ih7sz2 жыл бұрын
When we change the textfield value then how we can bind that value with the ViewModel by using that approach ? I need Two-Way data binding by using that approach.
@Podli1233 жыл бұрын
Can you make the similar tutorial with Combine , thanks for your videos 👏😺👍
@iOSAcademy3 жыл бұрын
Yes, soon
@afaaqahmedsaqi3 жыл бұрын
Intro was Cool!
@iOSAcademy3 жыл бұрын
Thanks’
@rungxanh29012 жыл бұрын
Thanks Afraz for the tutorial! I'm wondering if Apple has provided a builtin support for these in UIKit already?
@sanriodin11853 жыл бұрын
Great tutorial! but you makes some of us might be confused because you mix all of them in 1 file maybe next time you should split it for each file but thanks for your tutorial!
@iOSAcademy3 жыл бұрын
Thanks
@aleksandrzinovev429 Жыл бұрын
can you pls explain why you call listener(value) inside bind function?
@iOSAcademy Жыл бұрын
Its a subjective choice to trigger immediately
@linhnguyenios3 жыл бұрын
This is all of things I need, many thanks !
@iOSAcademy3 жыл бұрын
Youre welcome
@josiasmayo72032 жыл бұрын
hi! is this still used? looks like combine can do it too? thankx in advaance
@iOSAcademy2 жыл бұрын
Yes
@myungsup12503 жыл бұрын
Great Tutorial!! Thx!!
@iOSAcademy3 жыл бұрын
Youre welcome!
@Rahul-jf5kf2 жыл бұрын
👍 If we have Generics as Date and need formatted date on ViewController where should we format it?
@evotifiga2 жыл бұрын
Great video! Tnx! I have one question: can we use only User class instead of UserListViewModel? Do we need the UserListViewModel class since it is the same as User, only that User conform to the Codable protocol?
@johncerpa37823 жыл бұрын
Pretty cool !
@iOSAcademy3 жыл бұрын
Thanks
@jameelshehadeh90112 жыл бұрын
i thought @escaping is used to mark parameters that escapes the return cycle of the function but in the bind function there is no return keyword i wonder why using the @escaping
@Ni7ram2 жыл бұрын
same here
@vijendrayadav13523 жыл бұрын
Hey i really enjoyed this tutorial, can anybody tell me how the bind method is updating. Thanks
@iOSAcademy3 жыл бұрын
It has an internal listener
@codechamp25993 жыл бұрын
love your videos
@iOSAcademy3 жыл бұрын
Thanks!
@kittiesandbeer3 жыл бұрын
What's the point of updating the listener that the value has changed? Isn't the point of the listener to detect changes?
@laurapotter63212 жыл бұрын
Hi, thank you for your tutorial! What if I need to fetch images for each cell? If the url response contains title + imageURL, where should I put that image url fetching call? In the tableViewCell view?
@JLCodes2 жыл бұрын
Normally you would do that in your table view cell class. Common way is to create an extension for UIImageView and add a method that will let you download the image and cache it for better performance.
@ToanNguyen-by8xk3 жыл бұрын
Is it ok if I don't create cell viewmodel? can I use the user list view model with an user object?
@bikramsapkota15713 жыл бұрын
Great tutorial ! but how do we do Unit testing for view model after implementing observable, view model only has observable. Thanks for the tutorial.
@iOSAcademy3 жыл бұрын
Thanks
@АлексйУваровъ3 жыл бұрын
So, is it Combine bindings? iOS13 and up?
@ZhouHaibo3 жыл бұрын
Liked! One question, is `self.listener = listener` a call back or completion handler though it is not handled here? As you assign property listener(in Observable class) == listener(the anonymous closure in the bind call in ViewDidLoad), then when left side listener value changed, the closure will get the update automatically as they are reference to same memory address.
@karlhoffmann26653 жыл бұрын
Nice video explaining "boxing". I'm still pretty much noob, but came across a few different flavours of MVVM implementations. Wasn't the concept of MVVM though to put all the business logic at least into the ViewModel? At least that's what MVVM patterns had in common, i thought, even though some added the service layer together with CRUD operations into a model-domain layer and some keeping service layer and model separate as dependencies of the ViewModel... Also if you have a tableview it only makes sense to hand the cells their own sub-viewmodels if they implement some logic on per cell basis. otherwise simple viewData struct (immutable) would suffice and can be handed over completely by the same immutable or mutable ViewModel all together. I know it's still a bit hairy sometimes, especially with tableviews to draw the line where presentation logic should be incorporated. probably all obsolete in the future anyhow with combine and swiftui... just some thoughts... excuse the typos :)
@iOSAcademy3 жыл бұрын
Thanks
@BigCarso3 жыл бұрын
Agree this is only partly MVVM according to the typical definition
@cyberrage86583 жыл бұрын
Can you make a video about: How to make a multi choice quiz, for example, One question, 2 buttons, the user presses button 1 and the question label changes as-well as the options, if the user presses the other button the question label should change but to another question deferent from the other one Button 1: “Take a left”. B2: “Take right”. The user presses B2 and then the question updates: “You see a monster on the road” and so on. BUT if the user press B1 then the story should be diferent from B2
@misrudin9143 жыл бұрын
Mantap 👍👍👍👍👍
@bunnyrabits2 жыл бұрын
In Real Life do we use this kind of Observer- pattern to implement MVVM, or we use RxSwift or SwiftUI ?
@iOSAcademy2 жыл бұрын
Either or
@lifeofcoleton3 жыл бұрын
Been watching your tutorials for a long time, really like your teaching style. We are trying to get away from delegates in our products where I work, and I’m having trouble implementing a Binding pattern for the UITextFeild shouldChangeCharactersIn function. Basically, updating the VM property for every character typed in the text field. Think of response create password validation as an example. Any thoughts on how to do that? I definitely want to try extending my UITextView to inherit some sort of generic binding protocol and go from there.
@shuaiqingluo4400 Жыл бұрын
maybe search for rxswift and rxcocoa
@faridmammadov3682 жыл бұрын
I do not get why this pattern has MVVM in it. The pattern is exact copy of MVP, the only difference is you are not passing your View directly to Presenter but to Observable. Then you update your data in Observable and it updates the listener which is reference to View. In MVVM, your View should observe the ViewModel. In this case, though, so called ViewModel updates View through Observable which has reference to View.
@iOSAcademy2 жыл бұрын
Its subjective but bindings are common in mvvm
@YouBetterBeJedi3 жыл бұрын
Hmm why reinvent the wheel if it is already all there. Combine RxSwift etc. Really naive implementation