CoreData import CoreData class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. //获取管理的数据上下文对象 // let app = UIApplication.sharedApplication()…
模型对象归档 import UIKit class ViewController: UIViewController { @IBOutlet weak var textField: UITextField! @IBAction func btnSave(sender: UIButton) { var text = textField.text as NSString var image = UIImage(named: "log") var textFilepath = getPath…