Skip to content

Commit

Permalink
♻️ Fix Internal ViewController
Browse files Browse the repository at this point in the history
  • Loading branch information
usatie committed Apr 20, 2019
1 parent c93e5a9 commit 463c165
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion ViewController.xctemplate/TemplateInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
<array>
<string>-Instantiatable</string>
<string>-Instantiatable Injectable</string>
<string>-Instantiatable Emittable</string>
<string>-Instantiatable Interactable</string>
<string>-Instantiatable Injectable Interactable</string>
</array>
</dict>
</array>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,13 @@
import UIKit
import AppCore

final class ___FILEBASENAME___: UIViewController, Instantiatable, Injectable, Interactable {
final class ___FILEBASENAME___: UIViewController, Instantiatable, Emittable {

// MARK: - Mew.Instantiatable
typealias Input = <#value#>
typealias Environment = EnvironmentProvider
var environment: Environment

// MARK: - Mew.Injectable
private var input: Input {
didSet { updateUI() }
}

func input(_ input: Input) {
self.input = input
}

// MARK: - Mew.Emittable
typealias Output = <#value#>
private var handler: ((Output) -> Void)?
Expand All @@ -28,7 +19,6 @@ final class ___FILEBASENAME___: UIViewController, Instantiatable, Injectable, In

init(with input: Input, environment: Environment) {
self.environment = environment
self.input = input
super.init(nibName: nil, bundle: Bundle(for: type(of: self)))
}

Expand Down
10 changes: 10 additions & 0 deletions ViewController.xctemplate/ViewController+Interactable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ final class ___FILEBASENAME___: UIViewController, Instantiatable, Interactable {
typealias Environment = EnvironmentProvider
var environment: Environment

// MARK: - Mew.Injectable
private var input: Input {
didSet { updateUI() }
}

func input(_ input: Input) {
self.input = input
}

// MARK: - Mew.Emittable
typealias Output = <#value#>
private var handler: ((Output) -> Void)?
Expand All @@ -19,6 +28,7 @@ final class ___FILEBASENAME___: UIViewController, Instantiatable, Interactable {

init(with input: Input, environment: Environment) {
self.environment = environment
self.input = input
super.init(nibName: nil, bundle: Bundle(for: type(of: self)))
}

Expand Down

This file was deleted.

0 comments on commit 463c165

Please sign in to comment.