Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Wing Sun Cheung
Wing Sun Cheung
4,933 Points

The MVC pattern for iOS

Hi guys,

I have a question on how to design using MVC, I have been forcing myself to think in a MVC pattern when coding code and how classes should interact with each other. I am planning to setup a template where I have an array for button titles, and the objective of this template is to generate a button for every button title in the array.

Code wise, I know how it should be done and I had it running inside on viewDidLoad, but I just don't know how to integrate it into the MVC architecture.

How should the model look like and what should it output? also how should I design my controller and view?

thanks