My view controllers need to send messages to a couple of model objects. How do I obtain references to these model objects inside the view controller?
These model objects are "singletons" (in that there should only be one copy of them in the system at once) and they are used by multiple view controllers. So I can't instantiate them in the init method of each view controller.
I can't use constructor injection as the runtime chooses the init method that gets used to create the view controller.
I can't use "setter injection" as at no point (that I am aware of) do I have both a reference to the newly constructed view controller and references to the "singleton" model objects.
I don't want to turn the model objects into proper singletons and call a static method on them from the view controllers to retrieve the singleton instance, as this is a problem for testability. (Having the model objects as properties on the AppDelegate is essentially the same as doing this.)
I am using iOS 6 with Storyboards.