# iOS Screen Navigation Engine at Revolut

DevFeed: [iOS Screen Navigation Engine at Revolut](<https://devfeed.tech/articles/ios-screen-navigation-engine-at-revolut-26345.md>)

Original publisher: [Read original article](<https://medium.com/revolut/ios-screen-navigation-engine-at-revolut-1b189f45240?source=rss----44c5ac415e14---4>)

Author: Vincent Berihuete

Published: 2022-08-17T11:35:30Z

Content type: tutorial

Language: en

Sources: [Revolut Engineering](<https://devfeed.tech/sources/revolut-engineering.md>)

Topics: [iOS](<https://devfeed.tech/topics/ios.md>), [navigation](<https://devfeed.tech/topics/navigation.md>), [Code](<https://devfeed.tech/topics/code.md>), [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [implementation](<https://devfeed.tech/topics/implementation.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [fintech](<https://devfeed.tech/tags/fintech.md>), [ios](<https://devfeed.tech/tags/ios.md>), [ios-app-development](<https://devfeed.tech/tags/ios-app-development.md>), [ios-engineering](<https://devfeed.tech/tags/ios-engineering.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [revolut](<https://devfeed.tech/tags/revolut.md>)

## AI overview

This article describes Revolut's custom Flow Engine for iOS screen navigation. It compares storyboard- and view-controller-driven navigation with an abstraction that uses a state machine to manage flows, screens, dependencies, and actions.

## Source excerpt

Ever heard about the Coordinator pattern? Good for you, this article isn't about it. I'm here to open your eyes to Custom Navigation Engines just like the one we created on our Revolut Flow Engine. First let's talk about some traditional approaches for navigation before we get into our Flow engine: Storyboard actions navigation The most traditional way of doing navigation with storyboards is the one that's triggered by an action. As you know, you can ctrl + drag from your button to reach the desired screen on your storyboard. Segue driven navigation Another traditional type of storyboard navigation are segues, by doing ctrl+drag from one view controller to another we create a connection of a certain type (push, modally, etc) and assign it an ID. https://medium.com/media/8976cef3dea76b0581556b979848d899/href ViewController code driven navigation The most traditional way outside storyboards, is to instantiate and push or present your view controllers programmatically. https://medium.com/media/efae70b3641c09ff15c404f46504a84e/hrefFlow Engine Now let's bring out the big guns: the abstraction of navigation outside view controllers. Why do we need to abstract navigation? Well, imagine you have a FoodDeliveryApp and in there you have a screen called ProductDetails that shows the information for a given product (Hamburger 🍔, fish and chips 🍟, etc) -- but you want to call this screen and its dependencies from anywhere. Will it be enough to just instantiate the screen everywhere, with its dependencies and its actions? 🤯 of course not! 😅 Wait, what? Don't worry, here's some code: https://medium.com/media/b24d2268c0b542848c5d8a6f05379a6e/href When we want to call our ProductDetail screen and pass its business actions through dependency injection, we end up doing this: https://medium.com/media/cb3e85b0c7ae83eb4080db9b221086f3/href Code looks clean to you? Well, kind of 😅. What happens when you need to show that product page from other view controllers and handle its actions? .sho