First I checked this post and it wasn't useful
I want to apply dependency injection on navigation from a controller to another,
let's say I have controller A :
import UIKit
class A: UIViewController {
}
and a controller B :
import UIKit
class B: UIViewController {
var name : String!
}
I'm navigating from A to B in this way :
let bViewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "BVC")
as! B
bViewController.name = "HelloWorld"
self.navigationController?.pushViewController(bViewController, animated: true)
I want to convert my code in order to be using dependency injection through initializers.
can any one advice if this can be done, and if can be done how ??
thnx in advance.