Skip to content

Instantly share code, notes, and snippets.

@vialyx
Created May 26, 2018 13:15
Show Gist options
  • Save vialyx/9bdaabfa2f4120723ed910d84d065f5c to your computer and use it in GitHub Desktop.
Save vialyx/9bdaabfa2f4120723ed910d84d065f5c to your computer and use it in GitHub Desktop.
import UIKit
final class TaskListModuleConfigurator {
func configureModuleForViewInput<UIViewController>(viewInput: UIViewController) {
if let viewController = viewInput as? TaskListViewController {
configure(viewController: viewController)
}
}
private func configure(viewController: TaskListViewController) {
let model = TaskListModel()
model.output = viewController
let imagePicker = ImagePickerController()
imagePicker.output = viewController
viewController.model = model
viewController.imagePicker = imagePicker
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment