accessing Core Data context in ViewController properly in iOS
<p>I been doing </p>

<pre><code>let context = (UIApplication.sharedApplication().delegate as! AppDelegate).managedObjectContext
</code></pre>

<p>and just use the context in my ViewControllers but in Apples iOS developer Library I read</p>

<p>"A view controller typically shouldn’t retrieve the context from a global object such as the application delegate"</p>

<p>so what is the right way to access the context from the AppDelegate, I am a little bit confused...</p>