From the course: iOS App Development: Design Patterns for Mobile Architecture

Unlock the full course today

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

Create presenter, part 4

Create presenter, part 4

From the course: iOS App Development: Design Patterns for Mobile Architecture

Start my 1-month free trial

Create presenter, part 4

- [Instructor] The next step will be to put the spy cell presenter in place but first let's go ahead and cut this SecretDetailsPresenter and put it inside of a separate file. Paste the name, and we'll come back. Cut that and just paste that over here. And then come back into our spy cell. And now we should be able to build a presenter around the spy that this cell needs. In fact let's just go ahead and make that class in line here, and we'll say class SpyCellPresenter. And in here we know that we're going to get a spy, spy and we'll just say init with spy. Self.spy is equal to the one that's passed in, and we're going to need these properties to present, so let's come down to here and see what one's we're actually presenting. We'll move this up here. And I know that I need an age, so I'll say var age is equal to int, return and we're converting that spy's int. Same with the name, I'll just say var name. It's a string, return, a spy name, and then we'll do the same with the image name.…

Contents