开发者

Suggestion regarding core-data based apps

what are the steps to simply create a core-data application(using window based apps). withou开发者_高级运维t using core data for storage at the time of creating new project


  • add and configure your managed object model
  • define the managed object model, persistent store coordinator and managed object context objects somewhere in your app (often the app delegate object)
  • convert your controllers to use the new model

In the conversion step, I normally break it down to:

  • perform any inversion of control necessary so that the controllers are given their model obejcts (tell, don't ask)
  • define protocols describing the existing model API
  • make the existing model classes conform to the protocols
  • make the controller objects use these protocols instead of the model classes
  • define NSManagedObject subclasses that conform to the protocols
  • ensure the managed object subclasses are specified in the managed object model
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜