ios-template
ios-template copied to clipboard
Coordinator Cleanup
A few things here:
- Simplifies Coordinator down to
class Coordinator: NSObject {}
- Moves presentation style to be determined by parents
- Adopts a pattern to
attach
to children so that Coordinator lifecycles are ultimately determined by the View/Navigation hierarchy. This reduces the need to hold any reference to children and eliminates the need to hold strong references to children, which is now forbidden. - Removes some noise from the demo code to just demonstrate the pattern and little else.
Is this something that should be revisited soon?
Hey @chrisballinger, Rob V and I are currently taking the pattern for a spin. We're curious if the attach
pattern in combination with style rules (only holding weak references to children) will help iron out some common ownership issues that come from typical Coordinator/Controller patterns.
Seems a little too opinionated to merge into the template before someone gets some insight by using it in a client project. Open to feedback!