From the course: iOS Development: Architecture

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

MVP example

MVP example

From the course: iOS Development: Architecture

Start my 1-month free trial

MVP example

- [Instructor] Now let's take a look at an example. We're going to refactor an App from MVC to MVP. I create a new IOS App based on the master detail App tablet. Let's call it simply: Master Detail. And I'm gonna save it in the working projects directory. The App consists of a master view controller. The master view controller inherits from the UI Table View Controller. We also have a detail view controller, a sub-class of UI View Controller. The tablet comes with a minimum functionality. Let's build and run it by tapping the plus button, we can add new day time entries to the master view. Clicking on the roll, reveals the detail view controller that displays the given date and time. Now, let's take a look at the generated master view controller. There is a lot of code here. The objects class property is actually our model. The View Did Load delegate method, instantiates a UI bar button item. This button is added to the navigation bar. Upon tapping this button, the insert new object…

Contents