Skip to content

Inject into Object #12

Closed
Undistraction opened this Issue Oct 27, 2011 · 1 comment

2 participants

@Undistraction

There are some situations where the creation of an object is inaccessible because of framework architecture, for example the creation of UIStoryboard occurs in a static/class method. Subclassing it won't help as ultimately we have no access to what happens in that method and can't replicate the creation in an overridden method without risking bypassing crucial setup code. There are plenty of other instances where we would still want to use injection, but can't rely on the injector creating the object.

For this reason it would be hugely useful to be able to pass an object to Objection and ask for injection to occur into the already created object. This functionality already exists in JSObjectionInjectorEntry::buildObject, though it is currently obscured from usage.

Essentially I am asking for something like:

JSObjectionInjector::injectIntoObject:(id)object

@dewind
dewind commented Nov 30, 2012

Plan on adding this soon.

@dewind dewind closed this Dec 1, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.