iOS 13 introduces native dependency injection for storyboard view controllers. It would be truly awesome to add this feature for R.swift.
More here: https://www.hackingwithswift.com/example-code/uikit/how-to-use-dependency-injection-with-storyboards
This would be a nice feature!
I think we should generate an extra function on iOS 13 with a closure as last argument.
Something like this:
R.storyboard.main.userController { coder in .init(coder: coder, user: myUser) }
Note to self: I just found this branch I created over a year ago: https://github.com/mac-cain13/R.swift/tree/creator
I'm not sure what the state of this is. Maybe this works? Maybe it doesn't...
Most helpful comment
This would be a nice feature!
I think we should generate an extra function on iOS 13 with a closure as last argument.
Something like this:
R.storyboard.main.userController { coder in .init(coder: coder, user: myUser) }