Skip to content

Instantly share code, notes, and snippets.

@gracietti
Created April 11, 2017 19:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gracietti/600f5fc7f5045bf4c80f038a3a2d0c48 to your computer and use it in GitHub Desktop.
Save gracietti/600f5fc7f5045bf4c80f038a3a2d0c48 to your computer and use it in GitHub Desktop.
ProductCategoriesPresenter.swift
import Foundation
class ProductCategoriesPresenter: ProductCategoriesPresentation {
// MARK: Properties
weak var view: ProductCategoriesView?
var router: ProductCategoriesWireframe?
var interactor: ProductCategoriesUseCase?
...
}
extension ProductCategoriesPresenter: ProductCategoriesCoreDelegate {
func setupSubmodules(with product: Product) {
if let viewControllers = router?.setupSubmodules(with: product) {
view?.setupPages(with: viewControllers)
}
}
func setupView(for category: Category) {
let firstPage = category.hashValue
view?.setupView(for: firstPage)
}
}
extension ProductCategoriesPresenter: ProductCategoriesInteractorOutput {
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment