I've ran into a problem storing "notes" in swift.
Here is the note class
class Note {
var title = ""
var content = ""
var color = UIColor()
}
And i get the notes like this
var notes: [Note] = []
Ive added a couple notes
let note1 = Note()
note1.title = "Houses"
note1.content = "A knowledgable and experienced staff ready to help you build the… "
note1.color = #colorLiteral(red: 0.515632689, green: 0.2357951403, blue: 0.9598689675, alpha: 1)
let note2 = Note()
note2.title = "Note"
note2.content = "A beautifully redesined note app"
note2.color = #colorLiteral(red: 0.8978558183, green: 0.7694990635, blue: 0.2824732065, alpha: 1)
let note3 = Note()
note3.title = "Note"
note3.content = "A beautifully redesined note app"
note3.color = #colorLiteral(red: 0.2296327353, green: 0.8767140508, blue: 0.5295107365, alpha: 1)
let note4 = Note()
note4.title = "Note"
note4.content = "A beautifully redesined note app"
note4.color = #colorLiteral(red: 0.8787152171, green: 0.4267094135, blue: 0.2448620498, alpha: 1)
notes.append(note1)
notes.append(note2)
notes.append(note3)
notes.append(note4)
And now i need to save them and retrieve these notes so users can make there own notes and they will save on there device locally
Thanks for helping :)