Swift: Auto Layout - How to use Model View Controller MVC (Ep 5)

preview_player
Показать описание
Today's lesson will go through a bit of the Model View Controller pattern, often referred to as MVC. We'll explore why its a good idea to separate classes with well defined boundaries. In fact, let's create a Page Model and coordinate with the Controller to show this in our View Layer, which is Page Cell. It's an abstract concept that hopefully will sink in with this practical example. Enjoy.

Intermediate Training with Core Data

Instagram Firebase Course

Facebook Group

iOS Basic Training Course

Completed Source Code

Рекомендации по теме
Комментарии
Автор

Excellent lesson! Something I can put to immediate use. I have been using model objects, but the "didset" property is something new to me. I was watching the video and just saying "yeah, okay", until you got to that.

isaacclark
Автор

I am so happy the new course is out! I was honestly looking forward.

adamel-kadi
Автор

Thanks a lot for this video!! It helps me to understand MVC on Swift and how works with it!!

carlosaguilar
Автор

Just can't wait for the next ep. Nice tutorial.

antoniodingyi
Автор

Please do a video on MVVM architecture and VIPER.

ImtiazAbir
Автор

follow this tutorial, i built my first app, i am so happy. Thank you so much!

张三-iq
Автор

one of the best tutorials I've ever come across. But the thing is now there are too many Pages in this code. A page for model page cell page for everything.

makwanabhavin
Автор

i'm so happy, thankyou very much

ayt_daily
Автор

Great video as usual! Useful for my project atm

indianfyre
Автор

Hey dude! after doing some research, I realized that setting the views inside the constructor of the cell isn't the best way because it slows down horribly the scroll of the collectionView. After lots digging, I found that the best way is to set it inside the willDisplayCell method. That way, it won't take forever

tapizquent
Автор

Thanks you very much.but one thing I felt uncertain, is ViEW can have a property to store data?

nezhawong
Автор

MVC is deprecated in Android. In Android we use MVP. equivalent MVP for iOS is VIPER. So. it will good to see VIPER tutorials too )))

JamesBond-mqpd
Автор

Hi Brian! Thank you so much! That was helpful. Just quick question, how do i add checkboxes and button in the Cell? instead of having image, header and description, I want each Cell to have buttons and other to have a form with edittext views. Please help. Thank you

nmhdeveloper
Автор

Hey Brian, really good stuff here lol. But I've got a question, how do I add different elements to the pages? Like a text field in one of the pages but on one of the other pages, I wanna add a different element, like button or something. I appreciate your feedback! :)

abdullahajmal
Автор

is it possible to add different UIview like buttons in every page and also what if i will need just to show one button in one page and not in all of them? is it possible? i saw that the setup of the page structure will have to include things like images and texts, i guess that i will have to add UIview for the button inside the structure too, but that is where my question goes, what if i just need to show just one button in just one page, how can i specify this a good example was the moment he didnt write anything in the last bodytext he just set the string as "" empty, can i do the same with the button? sorry for the redundant question i did my best lol

Deepmindsecret
Автор

Hi, a question. Having watched the ios course from stanford on itunes U for a few years, the tutor says that the view should never communicate with the model, the controller should deal with bridging between the two, ie the controller should tell the view what parts of the model to display. By passing the model object(the page) to the view(the pagecell) you are breaking that rule. I realise it makes more sense to do it that way but does it break true MVC ?

sminkly
Автор

I'm new to iOS dev and after a long search, I failed to find any tutorial explaining what exactly does all these files in project work and how they map to each other. Could u please do a short intro on this basic structure? ;)

tomjerry
Автор

If I put a button on one of these cells, how can I transfer the indexPath of its parent cell to the model? I would like to use buttons to move to the next/previous cells in lieu of swiping.

shawnbierman
Автор

Hello Brian, love your videos. Thanks for sharing with us your knowledge 👍🏼. I have a question: is it important to know the C language in order to be a good Swift programmer? Thank you so much

ohcrazydiamond
Автор

I don't understand why all your text got bold. after I change to headerStrings, all the text become normal text.

BBorn