Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

πŸ›£ Fast and generic approach for making transitions between the view controllers with injection of dependencies

Notifications You must be signed in to change notification settings

DenisLitvin/GenericRouter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

15 Commits

Repository files navigation

GenericRouter

πŸ›£ Fast and generic approach for making transitions between the view controllers with injection of dependencies

Usage

Each view controller needs to conform to Routable. It must provide input and output arrays. Router will check if VC from which you present next VC has output sufficient to provide for next VC's input. For each input you make, the view controller has to have output to match.

class ViewControllerA: Routable {
 var routes: [Route] {
 return [
 Output<String>("Pushed from ViewControllerA")
 ]
 }
 
}
class ViewControllerB: Routable {
 var routes: [Route] {
 return [
 Input<String> { self.nsvigationItem.title = 0ドル }
 ]
 }
 
}
// ViewControllerB will have nav bar title 'Pushed from ViewControllerA'
Router.push(ViewControllerB(), from:ViewControllerA(), animated:true)

About

πŸ›£ Fast and generic approach for making transitions between the view controllers with injection of dependencies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /