We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9095e5 commit 910b4c6Copy full SHA for 910b4c6
XCoordinator-Example/Coordinators/AppCoordinator.swift
@@ -55,6 +55,17 @@ class AppCoordinator: NavigationCoordinator<AppRoute> {
55
self.trigger(.home(HomePageCoordinator().strongRouter))
56
}
57
)
58
+ alert.addAction(
59
+ .init(title: "Random", style: .default) { [unowned self] _ in
60
+ let routers: [() -> StrongRouter<HomeRoute>] = [
61
+ { HomeTabCoordinator().strongRouter },
62
+ { HomeSplitCoordinator().strongRouter },
63
+ { HomeTabCoordinator().strongRouter }
64
+ ]
65
+ let router = routers.randomElement().map { $0() }
66
+ self.trigger(.home(router))
67
+ }
68
+ )
69
return .present(alert)
70
case .newsDetail(let news):
71
return .multiple(
0 commit comments