Skip to content

Commit

Permalink
Override viewController property of AboutCoordinator to fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
pauljohanneskraft committed Dec 9, 2019
1 parent 6df485f commit 7df1179
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions XCoordinator-Example/Coordinators/AboutCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ enum AboutRoute: Route {
}

class AboutCoordinator: NavigationCoordinator<AboutRoute> {

// MARK: Computed properties

override var viewController: UIViewController! {
rootViewController.viewControllers.first { $0 is AboutViewController }
}

// MARK: Initialization

Expand Down

0 comments on commit 7df1179

Please sign in to comment.