From 463c1655cece6ce236dce18ecc00adb07a697347 Mon Sep 17 00:00:00 2001 From: Shun Usami Date: Sat, 20 Apr 2019 15:25:09 +0900 Subject: [PATCH] :recycle: Fix Internal ViewController --- ViewController.xctemplate/TemplateInfo.plist | 2 +- .../___FILEBASENAME___ViewController.swift | 1 + .../___FILEBASENAME___ViewController.xib | 0 .../___FILEBASENAME___ViewModel.swift | 0 .../___FILEBASENAME___ViewController.swift | 1 - ...ractable.swift => ViewController+Emittable.swift} | 12 +----------- .../ViewController+Interactable.swift | 10 ++++++++++ .../___FILEBASENAME___ViewController.swift | 1 + .../___FILEBASENAME___ViewController.xib | 0 .../___FILEBASENAME___ViewController.swift | 1 - 10 files changed, 14 insertions(+), 14 deletions(-) create mode 120000 ViewController.xctemplate/ViewController with ViewModel-Instantiatable Emittable/___FILEBASENAME___ViewController.swift rename ViewController.xctemplate/{ViewController with ViewModel-Instantiatable Injectable Interactable => ViewController with ViewModel-Instantiatable Emittable}/___FILEBASENAME___ViewController.xib (100%) rename ViewController.xctemplate/{ViewController with ViewModel-Instantiatable Injectable Interactable => ViewController with ViewModel-Instantiatable Emittable}/___FILEBASENAME___ViewModel.swift (100%) delete mode 120000 ViewController.xctemplate/ViewController with ViewModel-Instantiatable Injectable Interactable/___FILEBASENAME___ViewController.swift rename ViewController.xctemplate/{ViewController+Injectable+Interactable.swift => ViewController+Emittable.swift} (80%) create mode 120000 ViewController.xctemplate/ViewController-Instantiatable Emittable/___FILEBASENAME___ViewController.swift rename ViewController.xctemplate/{ViewController-Instantiatable Injectable Interactable => ViewController-Instantiatable Emittable}/___FILEBASENAME___ViewController.xib (100%) delete mode 120000 ViewController.xctemplate/ViewController-Instantiatable Injectable Interactable/___FILEBASENAME___ViewController.swift diff --git a/ViewController.xctemplate/TemplateInfo.plist b/ViewController.xctemplate/TemplateInfo.plist index ce7044d..5e5508a 100644 --- a/ViewController.xctemplate/TemplateInfo.plist +++ b/ViewController.xctemplate/TemplateInfo.plist @@ -60,8 +60,8 @@ -Instantiatable -Instantiatable Injectable + -Instantiatable Emittable -Instantiatable Interactable - -Instantiatable Injectable Interactable diff --git a/ViewController.xctemplate/ViewController with ViewModel-Instantiatable Emittable/___FILEBASENAME___ViewController.swift b/ViewController.xctemplate/ViewController with ViewModel-Instantiatable Emittable/___FILEBASENAME___ViewController.swift new file mode 120000 index 0000000..02668ce --- /dev/null +++ b/ViewController.xctemplate/ViewController with ViewModel-Instantiatable Emittable/___FILEBASENAME___ViewController.swift @@ -0,0 +1 @@ +../ViewController+Emittable.swift \ No newline at end of file diff --git a/ViewController.xctemplate/ViewController with ViewModel-Instantiatable Injectable Interactable/___FILEBASENAME___ViewController.xib b/ViewController.xctemplate/ViewController with ViewModel-Instantiatable Emittable/___FILEBASENAME___ViewController.xib similarity index 100% rename from ViewController.xctemplate/ViewController with ViewModel-Instantiatable Injectable Interactable/___FILEBASENAME___ViewController.xib rename to ViewController.xctemplate/ViewController with ViewModel-Instantiatable Emittable/___FILEBASENAME___ViewController.xib diff --git a/ViewController.xctemplate/ViewController with ViewModel-Instantiatable Injectable Interactable/___FILEBASENAME___ViewModel.swift b/ViewController.xctemplate/ViewController with ViewModel-Instantiatable Emittable/___FILEBASENAME___ViewModel.swift similarity index 100% rename from ViewController.xctemplate/ViewController with ViewModel-Instantiatable Injectable Interactable/___FILEBASENAME___ViewModel.swift rename to ViewController.xctemplate/ViewController with ViewModel-Instantiatable Emittable/___FILEBASENAME___ViewModel.swift diff --git a/ViewController.xctemplate/ViewController with ViewModel-Instantiatable Injectable Interactable/___FILEBASENAME___ViewController.swift b/ViewController.xctemplate/ViewController with ViewModel-Instantiatable Injectable Interactable/___FILEBASENAME___ViewController.swift deleted file mode 120000 index a084b20..0000000 --- a/ViewController.xctemplate/ViewController with ViewModel-Instantiatable Injectable Interactable/___FILEBASENAME___ViewController.swift +++ /dev/null @@ -1 +0,0 @@ -../ViewController+Injectable+Interactable.swift \ No newline at end of file diff --git a/ViewController.xctemplate/ViewController+Injectable+Interactable.swift b/ViewController.xctemplate/ViewController+Emittable.swift similarity index 80% rename from ViewController.xctemplate/ViewController+Injectable+Interactable.swift rename to ViewController.xctemplate/ViewController+Emittable.swift index 4d73fae..a496fd0 100644 --- a/ViewController.xctemplate/ViewController+Injectable+Interactable.swift +++ b/ViewController.xctemplate/ViewController+Emittable.swift @@ -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)? @@ -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))) } diff --git a/ViewController.xctemplate/ViewController+Interactable.swift b/ViewController.xctemplate/ViewController+Interactable.swift index 854d1eb..e88c0c0 100644 --- a/ViewController.xctemplate/ViewController+Interactable.swift +++ b/ViewController.xctemplate/ViewController+Interactable.swift @@ -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)? @@ -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))) } diff --git a/ViewController.xctemplate/ViewController-Instantiatable Emittable/___FILEBASENAME___ViewController.swift b/ViewController.xctemplate/ViewController-Instantiatable Emittable/___FILEBASENAME___ViewController.swift new file mode 120000 index 0000000..02668ce --- /dev/null +++ b/ViewController.xctemplate/ViewController-Instantiatable Emittable/___FILEBASENAME___ViewController.swift @@ -0,0 +1 @@ +../ViewController+Emittable.swift \ No newline at end of file diff --git a/ViewController.xctemplate/ViewController-Instantiatable Injectable Interactable/___FILEBASENAME___ViewController.xib b/ViewController.xctemplate/ViewController-Instantiatable Emittable/___FILEBASENAME___ViewController.xib similarity index 100% rename from ViewController.xctemplate/ViewController-Instantiatable Injectable Interactable/___FILEBASENAME___ViewController.xib rename to ViewController.xctemplate/ViewController-Instantiatable Emittable/___FILEBASENAME___ViewController.xib diff --git a/ViewController.xctemplate/ViewController-Instantiatable Injectable Interactable/___FILEBASENAME___ViewController.swift b/ViewController.xctemplate/ViewController-Instantiatable Injectable Interactable/___FILEBASENAME___ViewController.swift deleted file mode 120000 index a084b20..0000000 --- a/ViewController.xctemplate/ViewController-Instantiatable Injectable Interactable/___FILEBASENAME___ViewController.swift +++ /dev/null @@ -1 +0,0 @@ -../ViewController+Injectable+Interactable.swift \ No newline at end of file