Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
protocol View: class {
func show(data: String)
class ViewController: UIViewController, View {
let presenter: Presenter
var label: UILabel!
init(presenter: Presenter) {
self.presenter = presenter
super.init(nibName: nil, bundle: nil)
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
func show(data: String) {
label.text = data
override func viewDidLoad() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment