We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sorry, my app crash and get this error. And this is my code.
@objc protocol Animal { var name: String { get } @objc optional var running: Bool { get } } class Horse: Animal { let name: String let running: Bool init(name: String, running: Bool) { self.name = name self.running = running } convenience init(name: String) { self.init(name: name, running: false) } } class ResolverParameterInjectionVC: UIViewController, Resolving { override func viewDidLoad() { super.viewDidLoad() let smallHorse: Animal = Resolver.resolve(name: "small", args: "Spirit") let bigHorse: Animal = Resolver.resolve(name: "big", args: ["name": "Lucky", "running": true]) } } extension Resolver { public static func registerResolverParameterInjectionVC() { register { (_, args) in Horse(name: args.get()) }.implements(Animal.self, name: "small") register { (_, args) in Horse(name: args("name"), running: args("running")) }.implements(Animal.self, name: "big") } }
The text was updated successfully, but these errors were encountered:
1
Sorry, something went wrong.
No branches or pull requests
Sorry, my app crash and get this error.
And this is my code.
The text was updated successfully, but these errors were encountered: