London Escorts sunderland escorts 1v1.lol unblocked yohoho 76 https://www.symbaloo.com/mix/yohoho?lang=EN yohoho https://www.symbaloo.com/mix/agariounblockedpvp https://yohoho-io.app/ https://www.symbaloo.com/mix/agariounblockedschool1?lang=EN
7.8 C
New York
Thursday, December 12, 2024

ios – Swift Date relationship, deleted object after after reopen app


i’ve subject with objects.I’ve fashions

@Mannequin
class Tag {
    
    var id: UUID
    var title: String = ""
    var coloration: Int = 0xFFFFFF

   
    init( title: String, coloration: Int ) {
        self.id  = UUID()
        self.title = title
        self.coloration = coloration
       
    }
    
}
@Mannequin
class Process {
    var id: UUID = UUID()
    var title: String = ""
    var tags: [Tags] = []
    
    init(title: String, tags: [Tags] = [] ) {
        self.title = title
        self.tags = tags
    }
}

i choose tags earlier than create activity with @State non-public var selectedTags: [Tags] = []than i create activity with tags

let newTask = Process(
    title: taskTitle,
    tags: allTags
  
)

selectedList!.duties.append(newTask)
strive? modelContext.save()

once I create a number of duties with the identical tag, at first all the things is ok, but when I reload the applying, the tag stays within the final added activity and all different tags are deleted.I don’t perceive why the identical tag can’t be in a number of duties.

Related Articles

Social Media Auto Publish Powered By : XYZScripts.com