coordinator pattern can be used to separate(decouple) navigation logic from view controllers - can be best implemented in medium and complex projects
This repo contains a demo ios app written in swift, it demonstrates how the view controllers are driven by coordinators and router classes