Removed not needed stuff from generation.
Started adding a view for adding data. Signed-off-by: Louis Hollingworth <louis@hollingworth.ch>
This commit is contained in:
parent
81cb27dd6c
commit
9701c3428c
9 changed files with 118 additions and 139 deletions
21
Leganto/DataController.swift
Normal file
21
Leganto/DataController.swift
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
//
|
||||
// DataController.swift
|
||||
// Leganto
|
||||
//
|
||||
// Created by Louis Hollingworth on 2023-05-21.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import CoreData
|
||||
|
||||
class DataController: ObservableObject {
|
||||
let container = NSPersistentContainer(name: "Leganto")
|
||||
|
||||
init() {
|
||||
container.loadPersistentStores { desc, err in
|
||||
if let err = err {
|
||||
print("Core Data failed to load: \(err.localizedDescription)")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue