【文件属性】:
文件名称:CoreData-Combine:通过Combine创建CoreData
文件大小:127KB
文件格式:ZIP
更新时间:2021-05-22 10:18:12
Swift
CoreDataExample
我们将学习如何通过Combine来保存实体,从CoreData删除或获取实体
保存
private func addPerson () {
let action: Action = {
let bezo: Person = coreDataStore. createEntity ()
bezo. first_name = " Bezo "
bezo. last_name = " Deda "
let volksCar: Car = coreDataStore. createEntity ()
volksCar. name = " Volkswagen "
volksCar. owner = bezo
let
【文件预览】:
CoreData-Combine-main
----Simulator Screen Shot - iPhone 11 Pro - 2020-11-19 at 21.00.11.png(102KB)
----CoreDataExample()
--------Info.plist(2KB)
--------CoreDataExampleApp.swift(276B)
--------Source()
--------ContentView.swift(3KB)
--------CoreDataExample.xcdatamodeld()
--------Assets.xcassets()
----CoreDataExampleTests()
--------Info.plist(727B)
--------CoreDataExampleTests.swift(918B)
----README.md(2KB)
----CoreDataExample.xcodeproj()
--------project.xcworkspace()
--------xcuserdata()
--------project.pbxproj(24KB)
----CoreDataExampleUITests()
--------Info.plist(727B)
--------CoreDataExampleUITests.swift(1KB)