From e6ce9eed88709189c66a256522ce28d9d4224504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A1=BE=E6=8C=AF=E5=8D=8E?= Date: Tue, 16 Jul 2019 14:13:54 +0800 Subject: [PATCH] unpack weak property using '?' instead of '!' in swift --- swifty_viper/Code/Interactor/interactor.swift.liquid | 2 +- swifty_viper/Code/Presenter/presenter.swift.liquid | 2 +- swifty_viper_OSX/Code/Interactor/interactor.swift.liquid | 2 +- swifty_viper_OSX/Code/Presenter/presenter.swift.liquid | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/swifty_viper/Code/Interactor/interactor.swift.liquid b/swifty_viper/Code/Interactor/interactor.swift.liquid index 27ca4fa..6d5dea8 100644 --- a/swifty_viper/Code/Interactor/interactor.swift.liquid +++ b/swifty_viper/Code/Interactor/interactor.swift.liquid @@ -8,6 +8,6 @@ class {{ module_info.name }}Interactor: {{ module_info.name }}InteractorInput { - weak var output: {{ module_info.name }}InteractorOutput! + weak var output: {{ module_info.name }}InteractorOutput? } diff --git a/swifty_viper/Code/Presenter/presenter.swift.liquid b/swifty_viper/Code/Presenter/presenter.swift.liquid index 7da88bf..588724a 100644 --- a/swifty_viper/Code/Presenter/presenter.swift.liquid +++ b/swifty_viper/Code/Presenter/presenter.swift.liquid @@ -8,7 +8,7 @@ class {{ module_info.name }}Presenter: {{ module_info.name }}ModuleInput, {{ module_info.name }}ViewOutput, {{ module_info.name }}InteractorOutput { - weak var view: {{ module_info.name }}ViewInput! + weak var view: {{ module_info.name }}ViewInput? var interactor: {{ module_info.name }}InteractorInput! var router: {{ module_info.name }}RouterInput! diff --git a/swifty_viper_OSX/Code/Interactor/interactor.swift.liquid b/swifty_viper_OSX/Code/Interactor/interactor.swift.liquid index 27ca4fa..6d5dea8 100644 --- a/swifty_viper_OSX/Code/Interactor/interactor.swift.liquid +++ b/swifty_viper_OSX/Code/Interactor/interactor.swift.liquid @@ -8,6 +8,6 @@ class {{ module_info.name }}Interactor: {{ module_info.name }}InteractorInput { - weak var output: {{ module_info.name }}InteractorOutput! + weak var output: {{ module_info.name }}InteractorOutput? } diff --git a/swifty_viper_OSX/Code/Presenter/presenter.swift.liquid b/swifty_viper_OSX/Code/Presenter/presenter.swift.liquid index 7da88bf..588724a 100644 --- a/swifty_viper_OSX/Code/Presenter/presenter.swift.liquid +++ b/swifty_viper_OSX/Code/Presenter/presenter.swift.liquid @@ -8,7 +8,7 @@ class {{ module_info.name }}Presenter: {{ module_info.name }}ModuleInput, {{ module_info.name }}ViewOutput, {{ module_info.name }}InteractorOutput { - weak var view: {{ module_info.name }}ViewInput! + weak var view: {{ module_info.name }}ViewInput? var interactor: {{ module_info.name }}InteractorInput! var router: {{ module_info.name }}RouterInput!