How do I inject dependencies into an iOS view controller?
问题 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