Simple question re starting new project... CoreData

Discussion in 'iOS Programming' started by doanelinde, Aug 14, 2009.

  1. doanelinde macrumors member

    Jul 24, 2009
    When you create a new project you have the option to tick
    "Use Coredata for storage?"

    If I didn't tick that when I created my project, is there a way to go back and do that afterwards somehow?!
  2. doanelinde thread starter macrumors member

    Jul 24, 2009
  3. johnnyjibbs macrumors 68030


    Sep 18, 2003
    London, UK
    You don't need to click it, it just provides a template for using CoreData by (presumably) adding the relevant frameworks and some start method 'stubs' to guide you through the basics of what you need to implement.

    If you want to implement it halfway through, why don't you start a new project with it ticked just as a guide, and then copy the relevant methods stubs from there into your existing project? Then, make sure you have added the correct framework references to your existing project and you should be good to go.

    I often do this with other files, e.g. I use a view controller for my table views (because I hate the inflexibility of UITableViewController) but then I copy and paste the stub methods for the datasource and delegate into my existing project from a temporary new 'sample' file.
  4. doanelinde thread starter macrumors member

    Jul 24, 2009
    Oh cool, that's a good way of doing things actually.

    Cool, I was just worried that it was setting up some background stuff that I'd be missing if I didn't do it or something, good to know.
  5. dejo Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    Curious. What do you find inflexible about the UITableViewController?
  6. doanelinde thread starter macrumors member

    Jul 24, 2009
    Hmmm, it also adds the .xcdatamodel file for anyone else interested...

    Which is easy enough to do yourself, under newfile>rescourse

Share This Page