From 607380e02f1a2dbb95e931fc503c766feae82f72 Mon Sep 17 00:00:00 2001 From: Klaidas Strazdauskas Date: Fri, 9 Feb 2024 09:51:16 +0100 Subject: [PATCH] produce direct on plain viewcontroller --- 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) + } + +}