Best comment on this video :) I just did not have the time to explain bindings. Reactive programming may be confusing for starters :) BTW check out my latest video about building your very own *Custom Frameworks in Swift* : .ua-cam.com/video/oZloIsF1H4g/v-deo.html
Glad it helped. MVC and MVVM can be tricky to understand. BTW now you can have a Slide in Menu easily in SwiftUI: ua-cam.com/video/9WKVXHgEFU8/v-deo.html
I already implemented MMVM architecture in Java MVVM hopefully can implemented it in IOS Swift after knowing detail of Xcode, newcomer in Apple Gadget , thank you Mr for the nice explanation
You are welcome, Johan! BTW if you liked this video you will love my newest tutorial *Google Maps Swift: How to Implement Google Map in iOS* ua-cam.com/video/PFlTqE2ckgI/v-deo.html
Short story: make sure that your views only display, your controller only controls the views and everything else is moved out of them. It may be confusing at first, but practice makes perfect. BTW check out my latest video about building your very own *Custom Frameworks in Swift* : .ua-cam.com/video/oZloIsF1H4g/v-deo.html
Thanks for your video. ✅ 1/but when we have logic in cell and in its viewController. we one ViewModel contains all the logic or create one for the cell and another for viewController. "/ when we have for example three viewController that contains the three steps of creating something. we make one ViewModel instantiated in each ViewController or we make three different ViewModels class (first ViewModel, second view model, their ViewModel)
I would go with one view model moved through the 3 view controllers. BTW if you enjoyed this tutorial make sure you take a look at my latest video about Progress Indicator Examples: ua-cam.com/video/nHr2hh-KgTk/v-deo.html
Don't really know where from, it's just is in the iOS community. BTW if you did like this video I think you will enjoy "How to Publish an App to the App Store": ua-cam.com/video/ykiD5wqwSe4/v-deo.html
Hmm I think your example was too simple to really show the benefit of MVVM. Without databinding or the mediator pattern all you have is a simple mapping function.
10:10 couldn't you just create computed properties, name and level, in the model and put the logic in there? Then, for both the MVC and the MVVM, filling in the TableViewCell would be the same two lines.
Yes, but I would not be talking about MVVM. BTW if you did like this video make sure to take a look at how to create a MEME generator in SwiftUI: ua-cam.com/video/QyxQ624ZM94/v-deo.html
@@rebeloper Thank you for answering. Let me rephrase.... I'd like to see a case where MVVM would be 'required' or noticeably better; a case where using computed properties simply wouldn't work. I ask because I'm still trying to really understand the difference between the "C" in MVC and the "VM" in MVVM. So far, no video I've seen really does that.
Rebeloper thanks always for your tutorials they are very clear and help the whole community a lot! Thank you! I need help .. I have a struct struct TimeSelModel { let hour: String let minute: String } ------------------------------------------------------ I recover data this way because I need to view some data in section 0 of my collectionview and other data in section 1 struct TimeSelData { static func dataSec (section: Int, _ completion: @escaping (Result ) -> ()) { if section == 0 {completion (.success (dataSec0))} else {completion (.success (dataSec1))} } } let dataSec0 = [ TimeSelModel (hour: "09", minute: ": 30"), TimeSelModel (hour: "17", minute: ": 00") ] let dataSec1 = [ TimeSelModel (hour: "12", minute: ": 00"), TimeSelModel (hour: "19", minute: ": 00") ] --------------------------------------------------------------- I use the data this way inside my controller private var section: Int = 0 var data: [TimeSelModel] = [] private func fetchData () -> Void { TimeSelData.dataSec (section: section) {(result) in switch result { case.success (let data): self.data = date case.failure (let error): print (error.localizedDescription) } } } func collectionView (_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { self.section = section return data.count} func collectionView (_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell (withReuseIdentifier: TimeSelCell.cellID, for: indexPath) as! TimeSelCell cell.dataModel = data [indexPath.item] return cell } It doesn't work I don't get the right data for the sections of my collectionView .. Using your example in your tutorial how can I achieve my goal of displaying different data for 2 different sections of a collectionView?
Explaining this in a comment is hard. I can help you in a mentoring session: rebeloper.com/mentoring BTW take a look at my latest video: SwiftUI Animation ua-cam.com/video/z4xcp7QiUrE/v-deo.html
Awesome Fabio. Looking forward to the sessions when you need them. Do you like SwiftUI? Check out my latest Live Stream on SwiftUI Button Styles: ua-cam.com/video/jzLby63iGvI/v-deo.html
Glad it was helpful! If you enjoyed this video you might want to take a look at my lates video: Chart in iOS in SwiftUI -> ua-cam.com/video/3X2xvgNvlpE/v-deo.html
Which is you favourite MVC or MVVM?
MVVM is very useful for large application
comprehensive explanation ) Thanks a lot )
Agreed! BTW check out my latest video about building your very own *Custom Frameworks in Swift* : .ua-cam.com/video/oZloIsF1H4g/v-deo.html
How about binding? One of the benefits of MVVM that you can create binding and update your view reactively.
Best comment on this video :) I just did not have the time to explain bindings. Reactive programming may be confusing for starters :) BTW check out my latest video about building your very own *Custom Frameworks in Swift* : .ua-cam.com/video/oZloIsF1H4g/v-deo.html
Exactly the tutorial I was looking for, thanks so much for the great video :)
You're very welcome! BTW what do you think of my latest video on Flexible Header in SwiftUI: ua-cam.com/video/TaLA3ZBk6Zo/v-deo.html
This is the best explanation I ever saw about the theme.
Make it so simple for beginners understand it by comparison.
Glad it helped. MVC and MVVM can be tricky to understand. BTW now you can have a Slide in Menu easily in SwiftUI: ua-cam.com/video/9WKVXHgEFU8/v-deo.html
Thanks for the video. I will integrate a new project and the architecture is Clean MVVM; your video was amazing for my compreension.
Glad it was helpful! If you liked this video you will love *Swift Encryption with Crypto Manager* : ua-cam.com/video/PCKQ6HXIFo4/v-deo.html
I already implemented MMVM architecture in Java MVVM hopefully can implemented it in IOS Swift after knowing detail of Xcode, newcomer in Apple Gadget , thank you Mr for the nice explanation
You are welcome, Johan! BTW if you liked this video you will love my newest tutorial *Google Maps Swift: How to Implement Google Map in iOS* ua-cam.com/video/PFlTqE2ckgI/v-deo.html
Thanks for your video. However, I did not understand the separation of concern using a view model. Getting Puzzled
Short story: make sure that your views only display, your controller only controls the views and everything else is moved out of them. It may be confusing at first, but practice makes perfect. BTW check out my latest video about building your very own *Custom Frameworks in Swift* : .ua-cam.com/video/oZloIsF1H4g/v-deo.html
Thanks for your video. ✅
1/but when we have logic in cell and in its viewController. we one ViewModel contains all the logic or create one for the cell and another for viewController.
"/ when we have for example three viewController that contains the three steps of creating something. we make one ViewModel instantiated in each ViewController or we make three different ViewModels class (first ViewModel, second view model, their ViewModel)
I would go with one view model moved through the 3 view controllers. BTW if you enjoyed this tutorial make sure you take a look at my latest video about Progress Indicator Examples: ua-cam.com/video/nHr2hh-KgTk/v-deo.html
Thanks for the explanation!
No problem! BTW do you like the Previews in SwiftUI? Find out everything you have to know about Previews here: ua-cam.com/video/rxfter_wMXI/v-deo.html
Sir, can you add also MVP and VIPER architectures?
Noted. Till than take a look at my lates video about 30 Xcode Keyboard Shortcuts You NEED to Know: ua-cam.com/video/CWjHI3vZLSk/v-deo.html
Where did you get this definition of MVVM from? It seems quite different to the original idea from windows
Don't really know where from, it's just is in the iOS community. BTW if you did like this video I think you will enjoy "How to Publish an App to the App Store": ua-cam.com/video/ykiD5wqwSe4/v-deo.html
Hmm I think your example was too simple to really show the benefit of MVVM. Without databinding or the mediator pattern all you have is a simple mapping function.
In your example, is not the same thing that create a utility class wich receive a skillLevel and return a levelname ?
Yes, classes are also okay. If you enjoyed this video I suggest taking a look at Fira Code: ua-cam.com/video/fUk9hLLPvqo/v-deo.html
But what is Clean Architecture?
Sorry the video did not give you an answer.
Cool video!Thx!
Glad you liked it! BTW check out my latest video about building your very own *Custom Frameworks in Swift* : .ua-cam.com/video/oZloIsF1H4g/v-deo.html
good explanation
Thanks and welcome! Making MONEY just got EASIER on the App Store (and you didn't even know it!) 👉 ua-cam.com/video/7AVX4r8iV-k/v-deo.html
10:10 couldn't you just create computed properties, name and level, in the model and put the logic in there? Then, for both the MVC and the MVVM, filling in the TableViewCell would be the same two lines.
Yes, but I would not be talking about MVVM. BTW if you did like this video make sure to take a look at how to create a MEME generator in SwiftUI: ua-cam.com/video/QyxQ624ZM94/v-deo.html
@@rebeloper Thank you for answering. Let me rephrase.... I'd like to see a case where MVVM would be 'required' or noticeably better; a case where using computed properties simply wouldn't work. I ask because I'm still trying to really understand the difference between the "C" in MVC and the "VM" in MVVM. So far, no video I've seen really does that.
nice
Thanks, Abel.
Here's the easiest realtime app I’ve ever built 👇
ua-cam.com/video/tFA30p1w_vQ/v-deo.html
Amazing!
Thank you! Cheers! BTW check out my latest video about building your very own *Custom Frameworks in Swift* : .ua-cam.com/video/oZloIsF1H4g/v-deo.html
💥💥💥💥
💥💥💥💥 indeed! BTW check out my latest video about building your very own *Custom Frameworks in Swift* : .ua-cam.com/video/oZloIsF1H4g/v-deo.html
Rebeloper thanks always for your tutorials they are very clear and help the whole community a lot! Thank you!
I need help .. I have a struct
struct TimeSelModel {
let hour: String
let minute: String
}
------------------------------------------------------
I recover data this way because I need to view some data in section 0 of my collectionview and other data in section 1
struct TimeSelData {
static func dataSec (section: Int, _ completion: @escaping (Result ) -> ()) {
if section == 0 {completion (.success (dataSec0))}
else {completion (.success (dataSec1))}
}
}
let dataSec0 = [
TimeSelModel (hour: "09", minute: ": 30"),
TimeSelModel (hour: "17", minute: ": 00")
]
let dataSec1 = [
TimeSelModel (hour: "12", minute: ": 00"),
TimeSelModel (hour: "19", minute: ": 00")
]
---------------------------------------------------------------
I use the data this way inside my controller
private var section: Int = 0
var data: [TimeSelModel] = []
private func fetchData () -> Void {
TimeSelData.dataSec (section: section) {(result) in
switch result {
case.success (let data):
self.data = date
case.failure (let error): print (error.localizedDescription)
}
}
}
func collectionView (_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
self.section = section
return data.count}
func collectionView (_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell (withReuseIdentifier: TimeSelCell.cellID, for: indexPath) as! TimeSelCell
cell.dataModel = data [indexPath.item]
return cell
}
It doesn't work I don't get the right data for the sections of my collectionView .. Using your example in your tutorial how can I achieve my goal of displaying different data for 2 different sections of a collectionView?
Explaining this in a comment is hard. I can help you in a mentoring session: rebeloper.com/mentoring
BTW take a look at my latest video: SwiftUI Animation ua-cam.com/video/z4xcp7QiUrE/v-deo.html
@@rebeloper thanks Rebeloper it's interesting ! if i have big problems i create a session with you! thank you
Awesome Fabio. Looking forward to the sessions when you need them. Do you like SwiftUI? Check out my latest Live Stream on SwiftUI Button Styles: ua-cam.com/video/jzLby63iGvI/v-deo.html
Williams David Young Lisa Jackson Kimberly
Thanks for the explanation!
Glad it was helpful! If you enjoyed this video you might want to take a look at my lates video: Chart in iOS in SwiftUI -> ua-cam.com/video/3X2xvgNvlpE/v-deo.html