Dependency Injection


#1

I’ve been trying to understand how to access the ManagedObjectContext from another class so that I can keep the MVC design aspect.
I finally stumbled on this chapter, which has been really helpful.

I just wanted to clarify is what we’re doing with the ManagingViewController called Dependency Injection.
I’ve read online that there are two ways of accessing the ManagedObjectContext, a “singleton”, essentially how it is set up automatically being in the MyDocument (although I haven’t worked out retrieve to MOC from any other class) or using “Dependency Injection”…

Am I on the right lines or have i got completely bamboozled?