Skip to content

Instantly share code, notes, and snippets.

@twittemb
Last active January 20, 2018 01:19
Show Gist options
  • Save twittemb/6624adcd3b98aa1bc718ff783ba3e02a to your computer and use it in GitHub Desktop.
Save twittemb/6624adcd3b98aa1bc718ff783ba3e02a to your computer and use it in GitHub Desktop.
private func navigationToDashboardScreen () -> [NextFlowItem] {
let tabbarController = UITabBarController()
let wishlistStepper = WishlistStepper()
let wishListFlow = WishlistWarp(withService: self.service,
andStepper: wishlistStepper)
let watchedFlow = WatchedFlow(withService: self.service)
Flows.whenReady(flow1: wishListFlow, flow2: watchedFlow, block: { [unowned self]
(root1: UINavigationController, root2: UINavigationController) in
let tabBarItem1 = UITabBarItem(title: "Wishlist",
image: UIImage(named: "wishlist"),
selectedImage: nil)
let tabBarItem2 = UITabBarItem(title: "Watched",
image: UIImage(named: "watched"),
selectedImage: nil)
root1.tabBarItem = tabBarItem1
root1.title = "Wishlist"
root2.tabBarItem = tabBarItem2
root2.title = "Watched"
tabbarController.setViewControllers([root1, root2], animated: false)
self.rootViewController.pushViewController(tabbarController, animated: true)
})
return ([NextFlowItem(nextPresentable: wishListFlow,
nextStepper: wishlistStepper),
NextFlowItem(nextPresentable: watchedFlow,
nextStepper: OneStepper(withSingleStep: DemoStep.movieList))])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment