ios-template icon indicating copy to clipboard operation
ios-template copied to clipboard

Coordinator Cleanup

Open heyltsjay opened this issue 6 years ago • 3 comments

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.

heyltsjay avatar Mar 21 '18 18:03 heyltsjay

Is this something that should be revisited soon?

chrisballinger avatar Apr 12 '18 18:04 chrisballinger

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.

heyltsjay avatar Apr 12 '18 18:04 heyltsjay

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!

heyltsjay avatar Apr 12 '18 18:04 heyltsjay