From 75cb7d6a44e99e9d32240e35fc784908a8c238e0 Mon Sep 17 00:00:00 2001 From: klaidas-trafi <115455720+klaidas-trafi@users.noreply.github.com> Date: Fri, 9 Feb 2024 10:09:43 +0100 Subject: [PATCH] produce direct on plain viewcontroller (#24) --- Sources/StoryFlow/Interfaces/OuputProducing.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Sources/StoryFlow/Interfaces/OuputProducing.swift b/Sources/StoryFlow/Interfaces/OuputProducing.swift index 0bd3162..b45ec6d 100644 --- a/Sources/StoryFlow/Interfaces/OuputProducing.swift +++ b/Sources/StoryFlow/Interfaces/OuputProducing.swift @@ -56,3 +56,12 @@ extension OutputProducing where Self: UIViewController { } private var flowKey = 0 + + +public extension UIViewController { + + func produceDirect(_ output: T) { + Flow.implicit().proceed(with: output, from: self) + } + +}