iOS - Stanford Tutorial - CoreDataTableViewController - Licence [closed]

﹥>﹥吖頭↗ 提交于 2019-12-06 12:52:37

问题


Overview:

Stanford iOS tutorials contains an implementation (header + implementation file) to help use the table view while using core data.

link - http://www.stanford.edu/class/cs193p/cgi-bin/drupal/downloads-2011-fall

File Name - CoreDataTableViewController.zip (contains the below mentioned 2 files)

  • CoreDataTableViewController.h
  • CoreDataTableViewController.m

It contains the following text in both the files:

//  CoreDataTableViewController.h
//
//  Created for Stanford CS193p Fall 2011.
//  Copyright 2011 Stanford University. All rights reserved.

Question

  1. can I use the 2 files in my iOS app ?
  2. should I check with someone from stanford ?
  3. should I leave the above mentioned comments as it is ?

回答1:


Well the page you downloaded them from has this:

"This work by Stanford University is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License."

So you can use it for research & learning, but not for commercial purposes.

Here's more detail on that licence: http://creativecommons.org/licenses/by-nc-sa/3.0/us/




回答2:


CoreDataTableViewController is just a bunch of code copied from Apples documentation.. If you follow the lectures, this is pointed out by Paul Hegarty.. You could just copy and paste the same information from the documentation into you own class and sub-class it..




回答3:


I made this new Core Data wrapper for iOS in Swift - https://github.com/tadija/AERecord

It has Swift version of CoreDataTableViewController, and CoreDataCollectionViewController also.

Beside that you can use it to setup Core Data stack like this:

AERecord.setupCoreDataStack()

Access context for current thread like this:

AERecord.defaultContext

Save context like this:

AERecord.saveContext()

Create fetch requests like this:

NSManagedObject.create()

NSManagedObject.firstOrCreateWithAttribute("city", value: "Belgrade")

NSManagedObject.deleteAll()

let predicate = ...
NSManagedObject.firstWithPredicate(predicate)

NSManagedObject.allWithAttribute("year", value: 1984)

And much more... I hope it will be useful for someone.



来源:https://stackoverflow.com/questions/10272911/ios-stanford-tutorial-coredatatableviewcontroller-licence

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!