Skip to content
0:00 / 0:00

#coordinatorpattern#uikit#swift

How to use the Coordinator pattern in iOS

Paul Hudson

122K subscribers • 6 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Paul Hudson, creator of Hacking with Swift
  • May be out of date. Uploaded 7 years ago, in an area where tools change fast.

Intermediate. Assumes working knowledge.

76K views7 years ago1 recommendation

Mobile developmentSoftware designiOS and SwiftUISoftware architectureDesign patterns

Paul Hudson explains the coordinator pattern, how it solves navigation issues in view controllers, and demonstrates its implementation in Swift.

The coordinator pattern takes responsibility for navigation out of your view controllers and into a separate class, helping you make your view controllers smaller and simpler. In this video I'm going to explain the problem coordinators solve, walk you through the code required to use them, then give a complete coding demo with a new Xcode project. Coordinators were pioneered on iOS by Soroush Khanlou – he does tweet from time to time at @khanlou, but really you should check out his blog at khanlou.com. I've also published articles on coordinators you might find useful: - How to use the coordinator pattern in iOS apps: hackingwithswift.com/articles/71/how-to-use-the-coordinator-… - Using closures with the coordinator pattern: hackingwithswift.com/articles/132/using-closures-with-the-co… - How to create a custom Xcode template for coordinators: hackingwithswift.com/articles/158/how-to-create-a-custom-xco…

Why it's here

1 person recommends this

What people say. Recommended as a guide to implementing the coordinator pattern to simplify iOS view controllers.

Moments people linked to

u/Marpo007in r/swift • Recommends

How to use the Coordinator pattern in iOS

u/busta_thymesin r/swift • Mentions

Has the idea of instantiate been pulled from Swift over the last two years? Trying to make sense of a Paul Hudson video. Hi Everyone, I'm following along with a Paul Hudson video about the use of the Coordinator Pattern. It's from the beginning of 2019, so about two years old. It also references this post. In it he calls for the following code in a class called Main Coordinator: func start() { let vc = ViewController.instantiate() navigationController.pushViewController(vc, animated: true) } The ViewController subclasses from UIViewController. The problem however is that 'instantiate' does not seem to exist. As said here in red band: *Typ…
5View on Reddit

u/busta_thymesin r/swift • Mentions

I think I'm having an issue with the UINavigationController part of this Coordinator Pattern project. Learning from a Paul Hudson tutorial. Hi Everyone, I'm trying to learn the Coordinator Design Pattern from this Paul Hudson tutorial. This is the video version of that tutorial. When I completed the link to this video version, I realized that there was no visible navigation 'field/space' near the top. I seem to think that this field indicates that the presented view is a navigation controller, so I find it weird that it's not there. As well, the buttons don't seem to do anything but click- There is no action after them. I wonder if they'd work if I could get the UINavigationView to work? After…