Build A Tasks App With MVC


Build A Tasks App With MVC Duration: 02:36:27 Developer Bundle Intermediate

App architecture is important to understand as a practical iOS developer. But where do you start?

A fundamental architectural pattern is Model-View-Controller (MVC). It defines three roles for components of your app, and rules for interactions between them. MVC helps you to create maintainable, extensible and bug-free app projects.

In this course you’ll create a simple to-do list app called Tasks. Build an intermediate app project with Swift and learn how to create a solid architectural foundation for your own app projects.

Sign Up Now!

Practical Screencasts

Learn what every bit of code is for, and why you code it like that. The course explains why you’re doing what you’re doing, and most iOS tutorials don’t do that.

Swift 4 & iOS 11

The course is always kept up-to-date with the latest Swift version. You get lifetime updates for free. Don't waste time with outdated iOS tutorials!

Get Help & Support

Got stuck with a coding problem? Our support team is here to help you back on your feet in no time. We go the extra mile to help you move forward and learn more.

Meet Your Instructor

Reinder de Vries is a professional iOS developer and entrepreneur.

Since 2009 he has built 25+ for iOS, for companies including Tommy Hilfiger and Philips, and lead development at a bunch of crazy startups.

In 2014 he started LearnAppMaking to teach app development and marketing to indie app developers, and to help them create better, more profitable apps.

Get All 37 Chapters

App architecture is important to understand as a practical iOS developer. But where do you start?

Watch this course and learn

  • Learn about app architecture and Model-View-Controller
  • Build a complete Tasks app from scratch
  • Learn intermediate Swift programming with Realm

When you sign up for Zero to App Store, you get access to this video course, including all resources, templates, source code and challenges.

Course Chapters

  1. Introduction Let's build a Tasks app! In this course you'll learn about app architecture, Model-View-Controller and intermediate Swift programming. 01:24
  2. Understanding Model-View-Controller Model-View-Controller (or MVC) is an architectural design pattern. What's that!?
  3. What Is MVC? MVC is architecture for your app. Architecture allows you to create complex apps and it helps you to create an app that's easy to maintain. 06:14
  4. The Roles: Model, View, Controller With MVC you define parts of your app as Models, Views and Controllers. Let's find out what those roles do exactly. 05:19
  5. Why Use Architectural Design Patterns? Why are architectural design patterns important? They help avoid bugs and create maintainable code. 02:28
  6. Criticisms Of MVC Model-View-Controller is not perfect, and it has some disadvantages that you need to know. How can you work with them? 03:49
  7. The Tasks App Technical Design Before we get started, let's check out this app's technical design. What components does the app have, and how do they interact? 08:49
  8. Getting Started With The Project Fire up your Xcode, it's time to get this show on the road... 04:27
  9. Setting Up The Table View Controller One of the main components of the Tasks app is a table view controller. This chapter shows you how to create it. 11:17
  10. Creating The "Task" Model The first MVC object we'll create is the Task model. It encapsulates the data for to-do items. 04:43
  11. Designing The Task Cell View Design is important! And so are Views – another role within MVC. Let's build one. 01:19
  12. Using A Custom Font You don't always want your apps to express themselves with the default iOS font. Here's how you use a custom font in your app. 05:50
  13. Setting Up The UI Elements In this chapter I'll show you step-by-step how to build the user interface for this app in Interface Builder. 06:18
  14. Configuring The Constraints With constraints you can conveniently make your UIs responsive (once you get them right...). Here's how. 03:23
  15. Coding The Task Cell View A View always needs some code to function properly. Let's create that code for the Cell View. 16:07
  16. Coding The Table View Controller The Table View Controller of this app has the Controller role of MVC. Let's create it.
  17. Coding The "tasks" Property First, we store the Task to-do items in a property – the data source. 01:42
  18. The Task Builder The Builder design pattern comes in pretty handy when working with data. Here's how you use it. 03:45
  19. Pre-filling The "tasks" Array With the Task builder and property in place, let's populate it with data. 01:43
  20. Registering The Custom Table View Cells Before you can use custom table view cells, you need to register them. Here's how. 02:23
  21. Implementing The Table View Delegate Functions Table views use delegation to off-hand functionality to classes you, the developer, can create. Here's how. 04:43
  22. Run The App Let's test your app to see if it works OK. Did it work? Awesome! Found a bug? Debug it with help from our developer community. 00:50
  23. Creating New Tasks One of the features of your app should be creating new tasks, of course. The next chapters show how to code that.
  24. Showing The EmptyCell In The Table View The last cell of the table view controller can be used to create new tasks. Here's how to code that, following the MVC pattern. 04:33
  25. Creating A Persisted Task Object With Realm In this course you use Realm to persist to-do items to the disk, by writing them to a database. Here's how. 04:38
  26. Querying Tasks Objects From Realm That also means you need a way to read data from the Realm database. Let's code that! 06:05
  27. Coding The "onAddTaskTapped()" Function (1) A few things need to happen when the user adds a new task. Here's how to code it. 03:36
  28. Coding The "beginEditing()" Function App architecture really shines when you work with it when making technical decisions. Here's what that means... 02:56
  29. Coding The "onAddTaskTapped()" Function (2) Let's finalize adding new tasks by completing this part of the app. 05:31
  30. Editing, Saving, Completing And Deleting Tasks In the next chapters we'll dive into four more functions this app has. Happy coding!
  31. Interacting With The Text View The user uses the text view to edit the title of a task. Let's find out how that interaction works. 05:26
  32. The "TaskCellUpdating" Delegate Protocol How do you pass data from one Model-View-Controller component to another? One way is by using a protocol. Here's how. 02:02
  33. Implementing The "TaskCellUpdating" Protocol Defining the interaction between components of your app is step one. Step two is implementing that interaction. Let's go! 10:40
  34. Marking Tasks As Completed Sometimes it makes more sense to not follow the rules of your architectural pattern. This is one of those times. 04:28
  35. "Crossing" Items Off The List An app isn't done until it's done. One thing we still have to do, is visually crossing an item of our to-do list. I mean, why else have a to-do list if you can't cross items off!? 04:21
  36. Deleting Tasks On iOS it's easier to work with the SDKs than against them. One such case is deleting table view items. Here's how you do that (the right way). 03:54
  37. Conclusion Complete this course with challenges and practices you can apply to your own apps. 01:44

Build your own iOS apps from scratch

Master iOS development with Zero to App Store. You'll learn step-by-step how to build your own iOS 11 apps from scratch with Swift 4.

Learn More Start for Free