FeatherweightLabs / FeatherweightRouter

Clean Swift Router and Coordinator for declarative routing tree matching
Apache License 2.0
102 stars 12 forks source link

Replace Segments with extended ViewControllers #4

Closed agentk closed 8 years ago

agentk commented 8 years ago

The Segments are created by a router when it's ready to present a path of view controllers.

Segments are just a Path + ViewCreator. This was for the purpose of comparing based on the path and pattern that led to a view being displayed.

The Segments could be replaced with an extension to ViewControllers that held the path. ViewControllers would then be comparable in the same way.

agentk commented 8 years ago

Actually just separated the action functions into a RouterDelegate. Works a charm.