From 7df1179b377bee707f88144c530cb99ccd20ba88 Mon Sep 17 00:00:00 2001 From: Paul Kraft Date: Mon, 9 Dec 2019 10:29:33 +0100 Subject: [PATCH] Override viewController property of AboutCoordinator to fix memory leak --- XCoordinator-Example/Coordinators/AboutCoordinator.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/XCoordinator-Example/Coordinators/AboutCoordinator.swift b/XCoordinator-Example/Coordinators/AboutCoordinator.swift index 2a39280..1717e9e 100644 --- a/XCoordinator-Example/Coordinators/AboutCoordinator.swift +++ b/XCoordinator-Example/Coordinators/AboutCoordinator.swift @@ -15,6 +15,12 @@ enum AboutRoute: Route { } class AboutCoordinator: NavigationCoordinator { + + // MARK: Computed properties + + override var viewController: UIViewController! { + rootViewController.viewControllers.first { $0 is AboutViewController } + } // MARK: Initialization